get_error_message
Applicable Products
All processors
Function Usage
Returns the error information set by the engine or pass. (If no error information is set, an empty string is returned.)
Prototype
1 | get_error_message() -> str |
Parameters
None
Returns
The error information string. If no error information is set, an empty string is returned.
Restrictions
It can be used only in the current run call stack.
Example
1 2 3 4 5 6 7 8 | from ge.passes import FusionBasePass, PassContext class MyPass(FusionBasePass): def run(self, graph, context: PassContext): # Read the error information in run(). msg = context.get_error_message() return True |
Parent topic: PassContext