iNTERFACEWARE Products Manual > Learning Center > Learning Python > Error Detection > Error Detection Details > Error Parameters |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
Many errors, when trapped by an exception handler, provide a value that contains information about the error. This value can be a string or a list, depending on the error. To obtain this value, supply a variable name with the exception handler's except statement. For example:
This code raises an error when you try to subtract from a variable containing a string. When the error is raised, the errmsg variable contains information about the error. In this case, the output is:
|