Constructor
new module:br /Errors(type, message, file Nameopt, line Numberopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
String | The error type to be thrown. |
|
message |
String | A human-readable description of the error. |
|
fileName |
String |
<optional> |
(Optional) The name of the file containing the code that caused the error. |
lineNumber |
int |
<optional> |
(Optional) The line number of the code that caused the error. |
Members
(static) ILLEGAL _STATE
This error type is thrown when a method has been invoked at an illegal or inappropriate time.
(static) INVALID _DATA
This error type indicates that some required data was invalid.
(static) INVALID _PARAMETERS
This error type is thrown when a method is called with one or more invalid parameters. This could either be because a required parameter is not provided or a provided parameter is of the wrong type or is invalid for another reason (eg a string representation of a date that doesn't parse to an actual date).
(static) INVALID _TEST
This error type is thrown from acceptance test fixtures and indicates a problem with the test rather than the code under test. For example, if a particular fixture can only be used in a 'given' clause but is invoked in a 'then' clause, this error will be thrown. This will result in a test 'error' rather than a test 'failure'.
(static) NOT _SUPPORTED
This error is thrown when an operation is being attempted on an a class instance and it does not have the required implementation.
(static) REQUEST _FAILED
This error type indicates that a request for data has failed.
(static) UNIMPLEMENTED _ABSTRACT _METHOD
This error is thrown when an abstract method is called that should have been implemented in the extending class.
(static) UNIMPLEMENTED _INTERFACE
This error is thrown when an interface method is called that should have been implemented in the interface implementor class.
Methods
to String()
Returns the string representation of this error