Texture Viewer
Public Member Functions | List of all members
TextureTool::ExitException Class Reference
Inheritance diagram for TextureTool::ExitException:
TextureTool::Exception

Public Member Functions

 ExitException (int code=0)
 
 ~ExitException () Q_DECL_NOEXCEPT override
 
int code () const Q_DECL_NOEXCEPT
 
const char * what () const Q_DECL_NOEXCEPT override
 
- Public Member Functions inherited from TextureTool::Exception
 Exception ()
 
 ~Exception () Q_DECL_NOEXCEPT override
 
const char * what () const Q_DECL_NOEXCEPT override
 

Detailed Description

This exception is used in command line parsers to terminate the program. We don't rely on exit(0) call because stack is not unwinded and destructors are not called, so we throw this exception, and catch it in main().

Constructor & Destructor Documentation

◆ ExitException()

TextureTool::ExitException::ExitException ( int  code = 0)

Constructs ExitException with return code code.

◆ ~ExitException()

TextureTool::ExitException::~ExitException ( )
overridedefault

Destroys the object.

Member Function Documentation

◆ code()

int TextureTool::ExitException::code ( ) const
inline

Returns the code that should be return from the program.

◆ what()

const char * TextureTool::ExitException::what ( ) const
override

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.