Class
caplin.core

Error

caplin.core.Error extends the built in Error and allows the error type to be specified in the constructor. The name property is set to the specified type. Note that this class extends the built-in Error class.

Constructor Summary

Attributes Name and Description
caplin.core.Error(String sType, String sMessage, String sFileName, int nLineNumber)

Constructs a new Error of the provided type.

Field Summary

Attributes Name and Description
<static> caplin.core.Error.INVALID_TEST

This error type is thrown from acceptance test fixtures and indicates a problem with the test rather than the code under test.

<static> caplin.core.Error.LEGACY

This type should not be used for new code.

<static> caplin.core.Error.UNIMPLEMENTED_INTERFACE

This error is thrown when an interface method is called that should have been implemented in the interface implementor class.

Constructor Detail

caplin.core.Error(String sType, String sMessage, String sFileName, int nLineNumber)

Constructs a new Error of the provided type.

Parameters
String sType The error type to be thrown.
String sMessage A human-readable description of the error.
String sFileName (Optional) The name of the file containing the code that caused the error.
int nLineNumber (Optional) The line number of the code that caused the error.

Field Detail

<static> caplin.core.Error.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> caplin.core.Error.LEGACY

This type should not be used for new code. caplin.core.Error replaces caplin.core.Exception and any where that switch has been made the LegacyError type has been used. Over time these instances will be replaced with more meaningful types for each particular case and this type will eventually be removed.

<static> caplin.core.Error.UNIMPLEMENTED_INTERFACE

This error is thrown when an interface method is called that should have been implemented in the interface implementor class.