MATLAB BUILDER EX 1 Guida Utente Pagina 33

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 32
Handling Errors During a Method Call
Handling Errors During a M ethod Call
Errors that occur while creating a class instance or during a class method
create a n exception in the current procedure. Visual Basic p rovides
an exception handling capability through the
On Error Goto <label>
statement, in which the program execution jumps to <label> when an error
occurs. (
<label> must be located in the same procedure as the On Error
Goto
statement). All errors are handled this way, including errors within
the original MATLAB code. An exception creates a Visual Basic
ErrObject
object in the current context in a variable called Err. (See the Visual Basic for
Applications documentation for a detailed discussion on VBA error handling.)
All of the examples in this section illustrate the typical error trapping logic
used in function call w rappers for MATLAB Builder for Excel components.
2-13
Vedere la pagina 32
1 2 ... 28 29 30 31 32 33 34 35 36 37 38 ... 163 164

Commenti su questo manuale

Nessun commento