2.4. Error Handling

The Cascade Historian implements a mechanism for error reporting that provides as much information as possible from the different components and layers.

The first layer at which an error may occur is when the command name is not valid. The Command Set which handles this type of error issues a command error message. If the request for the command was synchronous then the error message goes with the response. If the request was asynchronous then the message is sent to the Cascade DataHub; from there it can be distributed to every registered user.

The second layer of possible error is when the command name is recognized but the list of arguments is not correct. The Command Set issues a command argument error message and posts it as described above. In many cases the message is more detailed, specifying the particular parameter values that caused the error.

If the syntax is correct then there are some other possible errors, such as the following:

Disk access errors occur when the system is trying to write to the disk and the disk is full. In this case the history continues to be collected into the current memory buffer until it is full. Then it is copied to the previous buffer overwriting the information stored there before. The information stored in the previous buffer before overwriting is therefore lost. Storage to the disk resumes as soon as an external archiving mechanism provides some space on the disk.

When these types of errors occur, the appropriate error string is produced. It is posted to the Cascade DataHub if the command was asynchronous, or is contained in the reply if the command was synchronous.