dev_set_check ( : : Mode : )

Specify the error handling.

dev_set_check specifies how HDevelop should react if an error occures. If Mode has the value 'give_error' -- which is the system default -- HDevelop stops the program execution if an exception occures and displays an error message. If you use '~give_error' the exception will be ignored and the program continues. dev_set_check is intended to be used in connection with dev_error_var, which allows to check for the result state of an operator.


Attention

If dev_set_check should be used for exported Code (C++), please note the description of set_check due to the different semantics in C++.


Parameters

Mode (input_control)
string -> string
Mode of error handling.
Default value: 'give_error'


Example
dev_close_window ()
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
dev_error_var (Error, 1)
dev_set_check ('~give_error')
FileName := 'wrong_name'
read_image (Image, FileName)
dev_set_check ('give_error')
ReadError := Error
if (ReadError # H_MSG_TRUE)
  write_string (WindowHandle, 'wrong file name: '+FileName)
endif
* Now the program will stop with an exception
read_image (Image, FileName)

Result

dev_set_check always returns 2 (H_MSG_TRUE)


Parallelization Information

dev_set_check is local and processed completely exclusively without parallelization.


Possible Successors

dev_error_var


See also

set_check


Module

System



Copyright © 1996-2005 MVTec Software GmbH