Resource callResourceRTE( PageContext pc, Component cfc, String methodName, Object[] args, boolean allowNull) { pc = ThreadLocalPageContext.get(pc); try { Object res = call(pc, getCFC(pc, cfc), methodName, args); if (allowNull && res == null) return null; return new CFMLResource(this, Caster.toComponent(res)); } catch (PageException pe) { pe.printStackTrace(); throw new PageRuntimeException(pe); } }
@Override public CatchBlock getCatchBlock(Config config) { CatchBlock cb = rootCause.getCatchBlock(config); Collection cause = (Collection) Duplicator.duplicate(cb, false); // rtn.setEL("message", getMessage()); if (!cb.containsKey(KeyConstants._detail)) cb.setEL( KeyConstants._detail, "Exception throwed while invoking function [" + eventName + "] in application event handler "); cb.setEL(ROOT_CAUSE, cause); cb.setEL(CAUSE, cause); // cb.setEL("stacktrace", getStackTraceAsString()); // rtn.setEL("tagcontext", new ArrayImpl()); // rtn.setEL("type", getTypeAsString()); cb.setEL(KeyConstants._name, eventName); return cb; }
@Override public StackTraceElement[] getStackTrace() { return rootCause.getStackTrace(); }
@Override public Throwable getRootCause() { return rootCause.getRootCause(); }
public PageGatewayException(PageException pe) { super(pe.getMessage()); this.pe = pe; }
@Override public void addContext(PageSource pageSource, int line, int column, StackTraceElement ste) { rootCause.addContext(pageSource, line, column, ste); }
@Override public boolean getExposeMessage() { return rootCause.getExposeMessage(); }
@Override public void printStackTrace(PrintWriter s) { rootCause.printStackTrace(s); }
@Override public void setDetail(String detail) { rootCause.setDetail(detail); }
@Override public int getTracePointer() { return rootCause.getTracePointer(); }
@Override public String getStackTraceAsString() { return rootCause.getStackTraceAsString(); }
@Override public String getExtendedInfo() { return rootCause.getExtendedInfo(); }
@Override public String getErrorCode() { return rootCause.getErrorCode(); }
@Override public Struct getErrorBlock(PageContext pc, ErrorPage ep) { return rootCause.getErrorBlock(pc, ep); }
@Override public String getDetail() { return rootCause.getDetail(); }
@Override public void printStackTrace() { rootCause.printStackTrace(); }
@Override public void printStackTrace(PrintStream s) { rootCause.printStackTrace(s); }
@Override public void setErrorCode(String errorCode) { rootCause.setErrorCode(errorCode); }
@Override public void setExposeMessage(boolean exposeMessage) { rootCause.setExposeMessage(exposeMessage); }
@Override public void setExtendedInfo(String extendedInfo) { rootCause.setExtendedInfo(extendedInfo); }
/** * Constructor of the class * * @param pe * @param eventName */ public ModernAppListenerException(PageException pe, String eventName) { super(pe.getMessage()); setStackTrace(pe.getStackTrace()); this.rootCause = pe; this.eventName = eventName; }
@Override public void setTracePointer(int tracePointer) { rootCause.setTracePointer(tracePointer); }
@Override public Struct getAddional() { return rootCause.getAdditional(); }
@Override public boolean typeEqual(String type) { return rootCause.equals(type); }
@Override public String getCustomTypeAsString() { return rootCause.getCustomTypeAsString(); }
@Override public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) { return rootCause.toDumpData(pageContext, maxlevel, dp); }