if(ioe instanceof PigException){
errCode = ((PigException)ioe).getErrorCode();
}
String exceptionMsg = ioe.getMessage();
validationErrStr += (exceptionMsg == null) ? "" : " More info to follow:\n" +exceptionMsg;
throw new FrontendException(validationErrStr, errCode, pigCtx.getErrorSource(), ioe);
}
validationErrStr += " More info to follow:\n";
try {
sf.getOutputFormat().checkOutputSpecs(dummyJob);
} catch (IOException ioe) {
byte errSrc = pigCtx.getErrorSource();
switch(errSrc) {
case PigException.BUG:
errCode = 2002;
break;
case PigException.REMOTE_ENVIRONMENT:
errCode = 6000;
break;
case PigException.USER_ENVIRONMENT:
errCode = 4000;
break;
}
validationErrStr += ioe.getMessage();
throw new FrontendException(validationErrStr, errCode, errSrc, ioe);
} catch (InterruptedException ie) {
validationErrStr += ie.getMessage();
throw new FrontendException(validationErrStr, errCode, pigCtx.getErrorSource(), ie);
}
}