PStack  2.0
Stack trace printer for MSVC and GCC binaries
psystem::exception::ui_exception Class Reference

An exception class to present unexpected user input as errors. More...

#include <ui_exception.hpp>

Inheritance diagram for psystem::exception::ui_exception:
Collaboration diagram for psystem::exception::ui_exception:

Construction / Destruction

template<typename... MessageArgs>
 ui_exception (std::string const &file, std::string const &function, uint32_t line, MessageArgs &&...message) noexcept
 Construct an exception instance with a formatted message. More...
 

Additional Inherited Members

- Public Member Functions inherited from psystem::exception::base_exception
virtual ~base_exception () noexcept
 Destroy the exception (supports run-time polymorphism).
 
virtual char const * what () const noexcept override
 Return a message describing the exception that occurred. More...
 
std::string const & function () const noexcept
 Return the function where the exception occurred. More...
 
uint32_t line_number () const noexcept
 Return the line on which the exception occurred. More...
 
std::string const & source_file () const noexcept
 Return the name of the source file where the exception occurred. More...
 
- Protected Member Functions inherited from psystem::exception::base_exception
 base_exception (std::string file, std::string function, uint32_t line) noexcept
 Construct a base_exception instance with no message. More...
 
template<typename... MessageArgs>
 base_exception (std::string file, std::string function, uint32_t line, MessageArgs &&...message) noexcept
 Construct a base_exception instance with a formatted message. More...
 
- Protected Member Functions inherited from psystem::not_assignable
not_assignableoperator= (not_assignable const &) const =delete
 Delete the basic assignment operator.
 
constexpr not_assignable () noexcept
 A simple CTOR suitable for noexcept and constexpr uses.
 
 ~not_assignable () noexcept
 A simple CTOR suitable for noexcept uses.
 

Detailed Description

An exception class to present unexpected user input as errors.

This class is mostly useful to distinguish invalid user input from other catastropic errors at the catch site. A layer that interacts with the user should catch this exception type and present an error message to give feedback that the given input made no sense to the application.

Author
Matt Bisson
Date
26 November, 2007 – 5 August, 2014
Since
PSystem 1.0
Version
PSystem 2.0

Constructor & Destructor Documentation

template<typename... MessageArgs>
psystem::exception::ui_exception::ui_exception ( std::string const &  file,
std::string const &  function,
uint32_t  line,
MessageArgs &&...  message 
)
inlinenoexcept

Construct an exception instance with a formatted message.

Parameters
[in]fileThe source file where the exception occurred.
[in]functionThe function in the source where the exception occurred.
[in]lineThe line in file where the exception occurred.
[in]messageThis should be in a printf message/args style calling convention.

The documentation for this class was generated from the following file: