Closed dprada closed 2 years ago
In the case of raising WrongGetArgumentError, the idea was something as (see former file):
def __init__(self, argument=None):
from molsysmt import __github_issues_web__
from inspect import stack
all_stack_frames = stack()
caller_stack_frame = all_stack_frames[1]
caller_name = caller_stack_frame[3]
api_doc = ''
message = f"The get method was invoked with not valid input argument:\"{argument}\""
message += (
f". Check {api_doc} for more information. "
f"If you still need help, open a new issue in {__github_issues_web__}."
)
super().__init__(message)
We would like to have exceptions returning more information. For example (see this former version of not_implemented_version_error.py):
For instance, if the user asks for a conversion not implemented, raising an exception with the following message would informative:
In order to do this, as @Daniel-Ibarrola addressed in https://github.com/uibcdf/MolSysMT/pull/54#discussion_r907620748, we need to work properly with the module
stack
from the libraryinspect
. Example: