Error Module

The "error" module is a module that manages the functions that retrieve error messages.

Module name

cri.atomcraft.error

The following functions are defined as:

Function Description Operation object
get_last_error Gets the error message caused by the failure of another function -



get_last_error

get_last_error is not a function to work with CRI Atom Craft.
This function gets the error message caused by the failure of another function.

Format

message = get_last_error()

Input parameter

None

Return value

NameValue
message Display the error message if not empty

Sample

import sys
import cri.atomcraft.acdebug as acdebug
import cri.atomcraft.acerror as acerror
# Execute the command
result = acdebug.ping()
# If it fails, output the error message if it is not empty
if not result["succeed"]:
lasterror = acerror.get_last_error()
print(lasterror)