Changeset 2459


Ignore:
Timestamp:
Apr 3, 2011, 5:42:44 PM (10 years ago)
Author:
Peter
Message:

make exception inherit from yat::utility::runtime_error rather than std::runtime_error. The former inherits from latter so exception classes still do inherit from std::runtime_error indirectly.

Location:
trunk/yat/utility
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Exception.cc

    r2303 r2459  
    3939
    4040  cmd_error::cmd_error(std::string message)
    41     : std::runtime_error(message)
     41    : runtime_error(message)
    4242  {}
    4343
    4444
    4545  errno_error::errno_error(std::string message)
    46     : std::runtime_error(message + strerror(errno))
     46    : runtime_error(message + strerror(errno))
    4747  {}
    4848
    4949
    5050  GSL_error::GSL_error(std::string message)
    51     : std::runtime_error("GSL_error: " + message)
     51    : runtime_error("GSL_error: " + message)
    5252  {}
    5353
    5454
    5555  GSL_error::GSL_error(std::string message, int gsl_status)
    56     : std::runtime_error("GSL_error: " + message + " " +
     56    : runtime_error("GSL_error: " + message + " " +
    5757                         gsl_strerror(gsl_status))
    5858  {}
     
    6060
    6161  IO_error::IO_error(std::string message)
    62     : std::runtime_error("IO_error: " + message)
     62    : runtime_error("IO_error: " + message)
    6363  {}
    6464
  • trunk/yat/utility/Exception.h

    r2331 r2459  
    5151     \brief Class used for error reported from Commandline or Option.
    5252   */
    53   class cmd_error : public std::runtime_error
     53  class cmd_error : public runtime_error
    5454  {
    5555  public:
     
    6969     \since New in yat 0.7
    7070   */
    71   class errno_error : public std::runtime_error
     71  class errno_error : public runtime_error
    7272  {
    7373  public:
     
    8585     exceptions.
    8686  */
    87   class GSL_error : public std::runtime_error
     87  class GSL_error : public runtime_error
    8888  {
    8989  public:
     
    107107     exceptions.
    108108  */
    109   class IO_error : public std::runtime_error
     109  class IO_error : public runtime_error
    110110  {
    111111  public:
Note: See TracChangeset for help on using the changeset viewer.