iNTERFACEWARE Products Manual > Installing and Using Chameleon > Learning the Advanced Features > Validation > Validation Rules > Python chmexception Object > Accessing Underlying Exception |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
The chmexception is actually a container for the underlying exception object. This is because Python requires that exceptions be of Python Exception type. To actually call methods on the error, you must first retrieve the underlying object using its errorobject attribute in the 4.5 parser engine:
The resulting exception looks like this:
In the new parser (5.0 and up), you can raise exceptions more easily. For example:
Whatever method you decide to use, rememeber that the specialized Chameleon object is only available within Python validation rules. |