Errors handling
In order to support Method Chaining calls, most ImGo methods do not return parameters with error information.
When a error occurs, ImGo collects the error information and prints it on the console. Calling other ImGo methods after the method that occur error will not take effect.
However, we still have a way to judge whether the ImGo method if occur errors, as shown in the following example.
ImGo has an Error
attribute, which is used to record the error information during the method call process of imgo. When the attribute is not nil
, it indicates that errors has occurred.
After running the above example, the output on console is as follows.
Last updated