MCPcopy Create free account
hub / github.com/apache/pig / getPigException

Method getPigException

src/org/apache/pig/impl/util/LogUtils.java:55–76  ·  view source on GitHub ↗
(Throwable top)

Source from the content-addressed store, hash-verified

53 }
54
55 public static PigException getPigException(Throwable top) {
56 Throwable current = top;
57 Throwable pigException = top;
58
59 if (current instanceof PigException &&
60 (((PigException)current).getErrorCode() != 0) &&
61 ((PigException) current).getMarkedAsShowToUser()) {
62 return (PigException) current;
63 }
64 while (current != null && current.getCause() != null){
65 current = current.getCause();
66 if((current instanceof PigException) &&
67 (((PigException)current).getErrorCode() != 0)) {
68 pigException = current;
69 if (((PigException)pigException).getMarkedAsShowToUser()) {
70 break;
71 }
72 }
73 }
74 return (pigException instanceof PigException? (PigException)pigException
75 : null);
76 }
77
78 public static void writeLog(Throwable t, String logFileName, Log log, boolean verbose, String headerMessage) {
79 writeLog(t, logFileName, log, verbose, headerMessage, true, true);

Callers 15

checkSchemaExMethod · 0.95
testMergeJoin3WayMethod · 0.95
testMergeJoinFailure2Method · 0.95
testExpressionFailMethod · 0.95
testNestedExceptionMethod · 0.95
testPigServerStoreNegMethod · 0.95
checkLogicalPlanMethod · 0.95
testByteArrayCast1Method · 0.95
testByteArrayCast5Method · 0.95
testByteArrayCast6Method · 0.95
testByteArrayCast7Method · 0.95

Calls 3

getMarkedAsShowToUserMethod · 0.80
getErrorCodeMethod · 0.45
getCauseMethod · 0.45

Tested by 15

checkSchemaExMethod · 0.76
testMergeJoin3WayMethod · 0.76
testMergeJoinFailure2Method · 0.76
testExpressionFailMethod · 0.76
testNestedExceptionMethod · 0.76
testPigServerStoreNegMethod · 0.76
checkLogicalPlanMethod · 0.76
testByteArrayCast1Method · 0.76
testByteArrayCast5Method · 0.76
testByteArrayCast6Method · 0.76
testByteArrayCast7Method · 0.76