Scrigroup - Documente si articole

Username / Parola inexistente      

Home Documente Upload Resurse Alte limbi doc  

AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows

AspAutocadCDot netExcelFox proHtmlJava
LinuxMathcadPhotoshopPhpSqlVisual studioWindowsXml

Exception Handling


+ Font mai mare | - Font mai mic


Trimite pe Messenger
Pointers - Declaring pointers, Arrays and pointers
Const and volatile
Variables, Data Types, I/O and Operators
Complete Programs in C
Function Overview
Retrieving Data from an ODBC Database
Strange operators
Main and Worker Thread Model
.NET Synchronization Support
Creating Multiple Document Interface Applications

Exception Handling

Whenever an integration error occurs such that the integration cannot continue, an exception is thrown, to be caught and handled by your driver routine. There is a special purpose exception type defined in CNumericalIntegrator for this purpose. This type is defined to be:

class IntegratorError : public std::runtime_error

explicit IntegratorError(EErrorState what_val, const string& what_arg)

: val what_val), std::runtime_error(what_arg)

EErrorState val()


EErrorState val_;

In order to handle these exceptions, you should surround each call to one of the integrator functions with a try block. You need to catch exceptions of type CNumericalIntegrator::IntegratorError, e.g.:


catch (CNumericalIntegrator::IntegratorError theErr)

Note that the IntegratorError exception returns two values: the value of the error (see Table 16) and a string describing the error. You can access these using the functions IntegratorError::val() and IntegratorError::what() (inherited from std::runtime_error).

You can turn off the exception handling feature by defining the macro _MSL_NO_EXCEPTIONS in a global prefix file. In this case, the integrator error state will still be set, but graceful recovery may not be possible.

Politica de confidentialitate



Vizualizari: 345
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2021 . All rights reserved

Distribuie URL

Adauga cod HTML in site