Prerequisite Please see here to get and set your API Key environment variable.
export LX_API_KEY=...
Error Class
You can now just replace all yourraise Exception
calls with raise LError
. For example:

Error Increment
You can also send an error along with related logs without throwing an error by using theincrement
method.