Contents Previous Next Subchapters Current Chapters-> normfunction path defined variables error errortrap help loadsave garbage eval execmat execfile sprintf interrupt runall filediff update Parent Chapters-> Omatrix6 advanced error Search Tools-> contents reference index search

Using the Standard O-Matrix Error Dialog
 Syntax error(msg) error(msg, topic) See Also usage , halt , errortrap , errordlg , help

Description
Posts the standard O-Matrix error dialog and then halts the currently executing O-Matrix program.  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".

Example
If you enter       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.

Reference
The message specified by msg is just the beginning of the error message posted in the error dialog. Other information, such as the corresponding source code location where the call to error was made, is included in the error dialog. The routine errordlg does not include this extra information.  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".

Mlmode
In Mlmode , this function can be accessed using the name 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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7698414325714111, "perplexity": 2377.683492409219}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-18/segments/1461860126502.50/warc/CC-MAIN-20160428161526-00164-ip-10-239-7-51.ec2.internal.warc.gz"}