001 package railo.runtime.exp; 002 003 004 import railo.runtime.PageContext; 005 import railo.runtime.PageSource; 006 import railo.runtime.dump.Dumpable; 007 import railo.runtime.err.ErrorPage; 008 import railo.runtime.type.Struct; 009 010 /** 011 * interface of the root business exception of railo 012 */ 013 public interface IPageException extends Dumpable { 014 015 /** 016 * return detailed error message 017 * @return detailed error message 018 */ 019 public String getDetail(); 020 021 /** 022 * Error Code 023 * @return Error Code 024 */ 025 public String getErrorCode(); 026 027 /** 028 * return extended info to the error 029 * @return extended info 030 */ 031 public String getExtendedInfo(); 032 033 /* * 034 * @return returns the line where the failure occured 035 */ 036 //public String getLine(); 037 038 /** 039 * @return Returns the tracePointer. 040 */ 041 public int getTracePointer(); 042 043 /** 044 * @param tracePointer The tracePointer to set. 045 */ 046 public void setTracePointer(int tracePointer); 047 048 /** 049 * Error type as String 050 * @return error type 051 */ 052 public String getTypeAsString(); 053 054 /** 055 * Error custom type as String 056 * @return error type 057 */ 058 public String getCustomTypeAsString(); 059 060 /** 061 * return detailed catch block of the error 062 * @return catch block 063 */ 064 public Struct getCatchBlock(PageContext pc); 065 066 /** 067 * return detailed error block of the error 068 * @param pc page context of the request 069 * @param ep error page 070 * @return catch block 071 */ 072 public Struct getErrorBlock(PageContext pc, ErrorPage ep); 073 074 /** 075 * add a template to the context of the error 076 * @param pageSource new template context 077 * @param line line of the error 078 * @param column column of the error 079 */ 080 public void addContext(PageSource pageSource, int line, int column, StackTraceElement element); 081 082 /** 083 * compare error type as String 084 * @param type other error type 085 * @return is same error type 086 */ 087 public boolean typeEqual(String type); 088 089 /** 090 * sets detailed error message 091 * @param detail 092 */ 093 public void setDetail(String detail); 094 095 /** 096 * sets the Error Code 097 * @param errorCode 098 */ 099 public void setErrorCode(String errorCode); 100 101 /** 102 * sets extended info to the error 103 * @param extendedInfo 104 */ 105 public void setExtendedInfo(String extendedInfo); 106 107 /** 108 * @return Returns the additional. 109 */ 110 // FUTURE public Struct getAdditional(); 111 public Struct getAddional(); 112 113 /** 114 * returns the java stracktrace as a String 115 * @return stack trace 116 */ 117 public String getStackTraceAsString(); 118 }