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.


LSException Class

class localsolver.LSException

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

See:

LSErrorCode

Summary

Methods

GetFileName

Gets the name of the LocalSolver source file where the exception is thrown.

GetLineNumber

Gets the line number in the LocalSolver source file where the exception is thrown.

GetFunctionName

Gets the name of the function where the exception is thrown.

GetExplanation

Gets the explanation about the exception.

GetMessage

Returns a string message with all useful info about the current exception.

GetErrorCode

Returns the error code associated to this exception.

ToString

Same as GetMessage().

Instance methods

string GetFileName()

Gets the name of the LocalSolver source file where the exception is thrown. Only useful for LocalSolver’s maintenance team.

Returns:

File name.

Return type:

string

int GetLineNumber()

Gets the line number in the LocalSolver source file where the exception is thrown. Only useful for LocalSolver’s maintenance team.

Returns:

Line number.

Return type:

int

string GetFunctionName()

Gets the name of the function where the exception is thrown.

Returns:

Function name.

Return type:

string

string GetExplanation()

Gets the explanation about the exception.

Returns:

Explanation.

Return type:

string

string GetMessage()

Returns a string message with all useful info about the current exception.

Returns:

Exception message.

Return type:

string

LSErrorCode GetErrorCode()

Returns the error code associated to this exception.

Returns:

Error code.

Return type:

LSErrorCode

string ToString()

Same as GetMessage().

Returns:

Exception message.

Return type:

string