schrodinger.application.mopac.exceptions module¶
Some custom MOPAC exception classes
- exception schrodinger.application.mopac.exceptions.MopacUserFacingException¶
Bases:
Exception
Base class for custom Mopac exceptions. This is modeled on the mechanism we use in Jaguar. (c.f. JAGUAR-7506.)
The idea is to distinguish exceptions which are intended to be user-facing from those that are not. The former include “expected” exceptions such as those arising from user error (e.g. invalid input file keywords) or issues unrelated to errors in the Jaguar code (such as disk space exceeded, file permissions invalid etc). In these cases, a clear and informative message should be printed in the user-facing output files about the specific error encountered. In many cases, a user can use this information to try to fix the issue and rerun the job.
In contrast, exceptions arising from developer or coding errors, including all built-in exceptions, should NOT be specifically output in the user-facing files. Such messages will typically be technical in nature, not useful, and potentially confusing to a user. Instead, the exception should be suppressed, and a generic error message printed informing the user something went wrong and how they can report it or get help from us.
Finally, there should never be any tracebacks printed in the user-facing files. This is implemented using the mmshare global exception handler from cmdline utils, independently of the exception type.
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception schrodinger.application.mopac.exceptions.MopacRuntimeError¶
Bases:
schrodinger.application.mopac.exceptions.MopacUserFacingException
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception schrodinger.application.mopac.exceptions.MopacIOError¶
Bases:
schrodinger.application.mopac.exceptions.MopacUserFacingException
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.