Skip to content
Snippets Groups Projects
  • Richard Berger's avatar
    e5c37bc7
    Implemented optional C++ exceptions in Error class · e5c37bc7
    Richard Berger authored
    These can be activated using the -DLAMMPS_EXCEPTIONS compiler flag.
    It has no effect for regular execution. However, while using
    it as a library, any issued command will capture the exception
    and save its error message. This can be queried using the
    lammps_has_error() and lammps_get_last_error_message() methods.
    
    The Python wrapper checks these in order to rethrow these errors
    as Python exceptions. See issue #146.
    
    (cherry picked from commit 6c154bb0b67a13d38968bc42d31013b97f87db75)
    e5c37bc7
    History
    Implemented optional C++ exceptions in Error class
    Richard Berger authored
    These can be activated using the -DLAMMPS_EXCEPTIONS compiler flag.
    It has no effect for regular execution. However, while using
    it as a library, any issued command will capture the exception
    and save its error message. This can be queried using the
    lammps_has_error() and lammps_get_last_error_message() methods.
    
    The Python wrapper checks these in order to rethrow these errors
    as Python exceptions. See issue #146.
    
    (cherry picked from commit 6c154bb0b67a13d38968bc42d31013b97f87db75)
library.cpp 21.31 KiB