This library offers methods for minimalist error handling in Lotus Script. Each method is available twice, once for usage in normal subroutines and functions, and once for usage in class members, identified by the suffix c.
Sub assert(condition As Integer, message As String)
Throws an error with the given message, if a given condition is false.Sub assertc(object As Variant, condition As Integer, message As String)
Throws an error with the given message, if a given condition is false.Notifies an error depending on the environment.
Sub notifyc(object As Variant)
Notifies an error depending on the environment.
Re-throws the current error with stack-trace added.
Re-throws the current error with stack-trace added.
Sub throw(id As Integer, message As String)
Throws an error with the givenidandmessage.
Sub throwc(object As Variant, id As Integer, message As String)
Throws an error with the givenidandmessage.
Throws an error with the given message, if the given condition is
false. The id of the error is always
1000 indicating a user-defined error.
1000 with the given message, if condition is falseThrows an error with the given message, if the given condition is
false. The id of the error is always
1000 indicating a user-defined error.
This method is designated to be solely used in classes and the
object argument should always be set to the current
class instance by passing Me.
object - class instance as context1000 with the given message, if condition is falseNotifies an error depending on the environment: For scheduled agents and event triggered actions, the notification goes to the log database, for UI-actions a message box appears.
Notifies an error depending on the environment: For scheduled agents and event triggered actions, the notification goes to the log database, for UI-actions a message box appears.
This method is designated to be solely used in classes and the
object argument should always be set to the current
class instance by passing Me.
object - class instance as contextRe-throws the current error with stack-trace added. If no current error exists, the method returns without throwing an error.
This method is intend to only be called inside an error handler. Use
the Error statement to throw a new error outside in
normal program flow.
Re-throws the current error with stack-trace added. If no current error exists, the method returns without throwing an error.
This method is intend to only be called inside an error handler. Use
the Error statement to throw a new error outside in
normal program flow.
This method is designated to be solely used in classes and the
object argument should always be set to the current
class instance by passing Me.
Throws an error with the given id and message.
If a previous error exists, a nested error is generated.
This method is intend to only be called inside an error handler. Use
the Error statement to throw a new error outside in
normal program flow.
id - id of error as used in Erlmessage - error message as used in Error$id and messageThrows an error with the given id and message and
object as the context for the error.
If a previous error exists, a nested error is generated.
This method is intend to only be called inside an error handler. Use
the Error statement to throw a new error outside in
normal program flow.
This method is designated to be solely used in classes and the
object argument should always be set to the current
class instance by passing Me.
object - class instance as contextid - id of error as used in Erlmessage - error message as used in Error$id and message