LocalSolver logo
is now
Hexaly logo

We're excited to share that we are moving forward. We're leaving behind the LocalSolver brand and transitioning to our new identity: Hexaly. This represents a leap forward in our mission to enable every organization to make better decisions faster when faced with operational and strategic challenges.

This page is for an old version of Hexaly Optimizer. We recommend that you update your version and read the documentation for the latest stable release.

LSError Class

class localsolver.LSError

LocalSolver exception. If an error occurred, LocalSolver throws a specific exception which contains useful info for debugging purposes.

Summary

Attributes
file_name Name of the LocalSolver source file where the exception is thrown.
function_name Name of the function where the exception is thrown.
explanation Explanation about the exception.
line_number Line number in the LocalSolver source file where the exception is thrown.
error_code Error code associated to this exception.
message A message with all useful info about the current exception.
Special methods
__str__ Returns a message with all useful info about the current exception.

Instance attributes

LSError.file_name

Name of the LocalSolver source file where the exception is thrown. Only useful for LocalSolver’s maintenance team. This attribute is read-only.

LSError.function_name

Name of the function where the exception is thrown. This attribute is read-only.

LSError.explanation

Explanation about the exception. This attribute is read-only.

LSError.line_number

Line number in the LocalSolver source file where the exception is thrown. Only useful for LocalSolver’s maintenance team. This attribute is read-only.

LSError.error_code

Error code associated to this exception. This attribute is read-only

LSError.message

A message with all useful info about the current exception. This attribute is read-only

Special operators and methods

LSError.__str__()

Returns a message with all useful info about the current exception. The returned string is similat to the attribute message.

Returns:A message with all useful info about the exception
Return type:str