@JsonData
public class ViewerException
extends java.lang.RuntimeException
implements java.io.Serializable, com.inet.error.HasErrorCode
One of the most important uses of ViewerException is for prompt event handling: A ViewerException can be thrown if prompts are needed, in which case the flag "needPrompts" is true.
Constructor and Description |
---|
ViewerException(int errorCode,
java.lang.String message,
java.lang.String format,
java.lang.String srvVersion,
java.lang.String srvJVM,
java.lang.String srvOS,
int srvCache,
java.lang.String stacktrace)
Initializes an exception from the server with the given error code, message, export format,
server version, server JAva VM, server OS, server cache version, and stacktrace.
|
ViewerException(int errorCode,
java.lang.String message,
java.lang.String format,
java.lang.String srvVersion,
java.lang.String srvJVM,
java.lang.String srvOS,
int srvCache,
java.lang.Throwable cause)
Initializes an exception from the server with the given error code, message, export format,
server version, server Java VM, server OS, server cache version, and stacktrace.
|
ViewerException(int errorCode,
java.lang.String message,
java.lang.String format,
java.lang.String srvVersion,
java.lang.String srvJVM,
java.lang.String srvOS,
int srvCache,
java.lang.String protocol,
java.lang.Throwable cause)
Initializes an exception from the server with the given error code, message, export format,
server version, server Java VM, server OS, server cache version, protocol, and stacktrace.
|
ViewerException(int errorCode,
java.lang.String message,
java.lang.String format,
java.lang.String srvVersion,
java.lang.String srvJVM,
java.lang.String srvOS,
int srvCache,
java.lang.String protocol,
java.lang.Throwable cause,
java.lang.String supportEmail)
Initializes an exception from the server with the given error code, message, export format,
server version, server Java VM, server OS, server cache version, protocol, and stacktrace.
|
ViewerException(java.lang.String message)
Initializes an exception with the given error message
|
ViewerException(java.lang.String message,
java.lang.Throwable cause)
Initializes an exception with the given error message and wraps another Throwable in this ViewerException
|
ViewerException(PromptData[] prompts)
For the "need prompts" Viewer Exception
|
Modifier and Type | Method and Description |
---|---|
static ViewerException |
createViewerException(java.lang.Throwable cause)
Simple factory method for creating a ViewerException as a Wrapper for a Throwable.
|
static ViewerException |
createViewerExceptionWithMessage(java.lang.String message,
java.lang.Throwable cause)
Wraps the given exception in a ViewerException.
|
int |
getErrorCode()
Returns the error code of the exception that was thrown on report server.
|
static java.lang.String |
getErrorMessage(java.lang.Throwable th)
Create a user friendly error message.
|
PromptData[] |
getPrompts()
Sets the array of prompt information - prompt information is stored as Prompt data objects
If this is not an exception encapsulating a prompt request, this will return null
|
boolean |
isNeedPrompts()
Whether this exception encapsulates a prompt request - in other words meaning the report can not be rendered
until the prompts specified by getPrompts() are provided to the server
|
void |
setNeedPrompts(boolean needPrompts)
Sets whether this exception encapsulates a prompt request - in other words meaning the report can not be rendered
until the prompts specified by getPrompts() are provided to the server
|
void |
setPrompts(PromptData[] prompts)
Sets the array of prompt information - prompt information is stored as Prompt data objects
|
public ViewerException(int errorCode, java.lang.String message, java.lang.String format, java.lang.String srvVersion, java.lang.String srvJVM, java.lang.String srvOS, int srvCache, java.lang.String stacktrace)
errorCode
- Error code of exception thrown on server sidemessage
- Error message of exceptionformat
- Export format at the time of the exceptionsrvVersion
- Server's i-net Clear Reports versionsrvJVM
- Server's Java VM versionsrvOS
- Server's Operating SystemsrvCache
- Server's Cache Version of i-net Clear Reportsstacktrace
- Stacktrace of exception thrown on server side.public ViewerException(int errorCode, java.lang.String message, java.lang.String format, java.lang.String srvVersion, java.lang.String srvJVM, java.lang.String srvOS, int srvCache, java.lang.Throwable cause)
errorCode
- Error code of exception thrown on server sidemessage
- Error message of exceptionformat
- Export format at the time of the exceptionsrvVersion
- Server's i-net Clear Reports versionsrvJVM
- Server's Java VM versionsrvOS
- Server's Operating SystemsrvCache
- Server's Cache Version of i-net Clear Reportscause
- Initializes the cause of this ViewerException to the specified value.public ViewerException(int errorCode, java.lang.String message, java.lang.String format, java.lang.String srvVersion, java.lang.String srvJVM, java.lang.String srvOS, int srvCache, java.lang.String protocol, java.lang.Throwable cause)
errorCode
- Error code of exception thrown on server sidemessage
- Error message of exceptionformat
- Export format at the time of the exceptionsrvVersion
- Server's i-net Clear Reports versionsrvJVM
- Server's Java VM versionsrvOS
- Server's Operating SystemsrvCache
- Server's Cache Version of i-net Clear Reportsprotocol
- Protocol version usedcause
- Initializes the cause of this ViewerException to the specified value.public ViewerException(int errorCode, java.lang.String message, java.lang.String format, java.lang.String srvVersion, java.lang.String srvJVM, java.lang.String srvOS, int srvCache, java.lang.String protocol, java.lang.Throwable cause, java.lang.String supportEmail)
errorCode
- Error code of exception thrown on server sidemessage
- Error message of exceptionformat
- Export format at the time of the exceptionsrvVersion
- Server's i-net Clear Reports versionsrvJVM
- Server's Java VM versionsrvOS
- Server's Operating SystemsrvCache
- Server's Cache Version of i-net Clear Reportsprotocol
- Protocol version usedcause
- Initializes the cause of this ViewerException to the specified value.supportEmail
- optional support emailpublic ViewerException(java.lang.String message)
message
- Error messagepublic ViewerException(java.lang.String message, java.lang.Throwable cause)
message
- Error message of this exceptioncause
- Throwable to wrap in this ViewerExceptionpublic ViewerException(PromptData[] prompts)
prompts
- Prompts needed: Array of prompt information - each prompt data object
holds information about what type of prompt, what default values there are, etc.PromptData
public static ViewerException createViewerException(java.lang.Throwable cause)
cause
- Throwable to wrap in this ViewerExceptionpublic static ViewerException createViewerExceptionWithMessage(java.lang.String message, java.lang.Throwable cause)
message
- String to append to the beginningcause
- Throwable to wrappublic int getErrorCode()
public static java.lang.String getErrorMessage(java.lang.Throwable th)
th
- Throwable to extract error message from, truncated if necessarypublic void setPrompts(PromptData[] prompts)
prompts
- Array of prompts to store in this exceptionpublic PromptData[] getPrompts()
public void setNeedPrompts(boolean needPrompts)
needPrompts
- Does this exception encapsulate a prompt request?public boolean isNeedPrompts()
Copyright © 1999-2020 by i-net software GmbH