Create a try-catch statement
Framework for numerical computations, data analysis and visualisation
Brought to you by:
numere
Create a try-catch statement, which can be used to catch errors. Something like
try
## some code
catch (ERRORTYPE)
## handle here
catch (OTHER ERROR TYPE)
## handle here
endtry
The try-catch statement can be implemented as flow ctrl statement with some logical adaptions. Furthermore, we'll have to select the error types, which can be catched by this statement. As syntax, we'll use
try
## some code
catch expression: ## catch errors of type "expression" here
## handle these errors
catch: ## catch all other catchable errors here
{sType, sMessage} = getlasterror(); ## Get type and message
warn sMessage ## do something with the information
rethrow; ## rethrow the handled error
endtry
try...catch , getlasterror() and rethrow were executed.Functionality was added to the automatic SW tests. No deviations detected.
Commit: [r1018]
Commit: [r1019]
Tickets: #600
Anonymous
Diff:
Diff:
Diff:
Related
Commit: [r1018]
Commit: [r1019]
Diff: