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