|
Contents | Previous | Next | Subchapters |
| Syntax |
error(msg) |
error(msg, topic) | |
| See Also | usage , halt , errortrap , errordlg , help |
msg
is a matrix that specifies
an error message that is included in the error dialog.
This is the beginning of the actual error message.
It is either an
empty matrix
or it must be a character matrix.
If all the character in msg are
white space
characters,
the error routine returns without posting the error dialog.
Otherwise O-Matrix execution is halted
and
error never returns to the routine that called it.
topic
If the Help button in the error dialog is selected,
the file specified by the
character row vector topic
in the directory c:\omwin\htm is displayed in your web browser.
This file specification does not include the extension of the file
which must be .htm.
If the specified file is not present in the c:\omwin\htm directory,
the file c:\omwin\htm\index.htm is displayed.
If topic is not present,
the file c:\omwin\htm\contents.htm is displayed which
corresponds to topic being equal to "contents".
error("Error in call to sin", "sin")
O-Matrix will display an error dialog with an error message
and the first line of the error message will be
Error in call to sin
If you then select the Help button in the error dialog,
O-Matrix will display the file c:\omwin\htm\sin.htm
in your default web browser.
You can use the errortrap
routine to trap calls to
the error function just like error messages that are generated
by the O-Matrix system.
Note that the first rowdim(msg) rows of the message passed to
the error trapping routine will contain the message specified by
msg.
Also not that if the file specified by topic is not present,
the topic passed to the error trapping routine is "index".
usage
as well as the name error.
If in Mlmode you enter
usage('Improver argument')
O-Matrix will display an error dialog with an error message
and the first line of the message will be
Improper argument