chsvlib
chsv helper source code
Chusov::Exceptions Namespace Reference

A namespace for chsvlib generic exception classes and for special helper function. More...

Classes

class  Exception
 Defines a class of objects specifying various exceptions with extended support for description formatting. . More...
 
class  ExceptionWithGenericCode
 A class template specifying a generic exception which has a corresponding integral error code. More...
 
struct  ChsvCodeExceptionTempl
 A template defining classes depending on the specified chsvlib error code. . More...
 
struct  OutOfMemoryException
 Insufficient memory exception. More...
 
struct  InvalidParameterException
 Invalid parameter exception. More...
 
struct  InsufficientBufferException
 Insufficient buffer exception. More...
 
struct  OutOfRangeException
 Out of range exception. More...
 
struct  InitializationFailureException
 Initialization failure exception. More...
 
struct  NotInitializedException
 Reading an uninitialized resource exception. More...
 
struct  AlreadyInitializedException
 Initializing an already initialized resource exception. More...
 
struct  InvalidVersionException
 Improper version exception. More...
 
struct  NotFoundException
 Item not found exception. More...
 
struct  AlreadyExistsException
 Resource already exists exception. More...
 
struct  InvalidResourceException
 Invalid resource exception. More...
 
struct  AccessDeniedException
 Access denied exception. More...
 
struct  StorageFullnessException
 Storage full exception. More...
 
struct  InvalidCharSequenceException
 Invalid multibyte character sequence exception. More...
 
struct  OperationCancelledException
 Operation is cancelled exception. More...
 
struct  NameTooLongException
 Name is too long exception. More...
 
struct  PossibleDeadlockException
 Possible deadlock exception. More...
 
struct  TimeoutException
 Timeout exception. More...
 
struct  OwnerDeadException
 A thread owning a resource is dead. More...
 
struct  UnsupportedCallException
 Unsupported (unimplemented) call exception. More...
 
struct  ArithmeticOverflowException
 Arithmetic overflow exception. More...
 
struct  StackOverflowException
 Stack overflow exception. More...
 
struct  UnknownException
 Unknown exception corresponding to an unknown error code . More...
 
class  PlatformException
 A class template designed specifically for using with externally defined error codes. More...
 
struct  code_based_exception
 Defines a nested type alias to a chsvlib exception depending on the chsvlib error code. More...
 
class  nested_exception
 Together with throw_with_nested and rethrow_if_nested implements a behaviour of the standard C++11 nested exceptions mechanism as defined by the std::nested_exception class and by the std::throw_with_nested and std::rethrow_if_nested functions respectively. . More...
 

Typedefs

typedef ExceptionWithGenericCode< chsverror_tChsvCodeException
 An alias for the type of exception objects to be bound with chsvlib error codes.
 
template<chsverror_t exception_code>
using code_based_exception_t = typename code_based_exception< exception_code >::type
 A type alias for an exception class which corresponds to the given error code. More...
 

Functions

template<bool fProcessSuccessCodeAsUnknownError = true, class ... DescriptionFormatParams>
void ChsvExceptionByChsvCode (chsverror_t nCode, const char *restrict pszDescription, DescriptionFormatParams ... format_params)
 Creates an instance of the ChsvCodeExceptionTempl class, bound with the specified chsvlib error code, and throws it as an exception. . More...
 
template<bool fProcessSuccessCodeAsUnknownError = true, class ... DescriptionFormatParams>
void ChsvExceptionByChsvCode (chsverror_t nCode, const wchar_t *restrict pszDescription, DescriptionFormatParams ... format_params)
 Creates an instance of the ChsvCodeExceptionTempl class, bound with the specified chsvlib error code, and throws it as an exception. . More...
 
template<bool fProcessSuccessCodeAsUnknownError = true>
void ChsvExceptionByChsvCode (chsverror_t nCode)
 Creates an instance of the ChsvCodeExceptionTempl class, bound with the specified chsvlib error code, and throws it as an exception. More...
 
template<bool fProcessSuccessCodeAsUnknownError = true>
void ChsvExceptionByChsvCode ()
 Constructs and throws an exception object by a chsvlib error code returned by the GetLastChsvError function. More...
 
template<bool fProcessSuccessCodeAsUnknownError = true, class ... DescriptionFormatParams>
void ChsvExceptionByPosixCode (errno_t nCode, const char *restrict pszDescription, DescriptionFormatParams ... format_params)
 Creates an instance of the ChsvCodeExceptionTempl class and throws it as an exception. The instantiation of the ChsvCodeExceptionTempl class template is chosen depending on the result of a translation of the specified POSIX error code to the corresponding chsvlib error code. . More...
 
template<bool fProcessSuccessCodeAsUnknownError = true, class ... DescriptionFormatParams>
void ChsvExceptionByPosixCode (errno_t nCode, const wchar_t *restrict pszDescription, DescriptionFormatParams ... format_params)
 Creates an instance of the ChsvCodeExceptionTempl class and throws it as an exception. The instantiation of the ChsvCodeExceptionTempl class template is chosen depending on the result of a translation of the specified POSIX error code to the corresponding chsvlib error code. . More...
 
template<bool fProcessSuccessCodeAsUnknownError = true>
void ChsvExceptionByPosixCode (errno_t nCode)
 
template<bool fProcessSuccessCodeAsUnknownError = true>
void ChsvExceptionByPosixCode ()
 
template<bool fProcessSuccessCodeAsUnknownError = true, class ... DescriptionFormatParams>
void ChsvExceptionByWindowsCode (unsigned long nCode, const char *restrict pszDescription, DescriptionFormatParams ... format_params)
 Creates an instance of the ChsvCodeExceptionTempl class and throws it as an exception. The instantiation of the ChsvCodeExceptionTempl class template is chosen depending on the result of a translation of the specified Windows error code to the corresponding chsvlib error code. More...
 
template<bool fProcessSuccessCodeAsUnknownError = true, class ... DescriptionFormatParams>
void ChsvExceptionByWindowsCode (unsigned long nCode, const wchar_t *restrict pszDescription, DescriptionFormatParams ... format_params)
 Creates an instance of the ChsvCodeExceptionTempl class and throws it as an exception. The instantiation of the ChsvCodeExceptionTempl class template is chosen depending on the result of a translation of the specified Windows error code to the corresponding chsvlib error code. More...
 
template<bool fProcessSuccessCodeAsUnknownError = true>
void ChsvExceptionByWindowsCode (unsigned long nCode)
 
template<bool fProcessSuccessCodeAsUnknownError = true>
void ChsvExceptionByWindowsCode ()
 
template<bool fProcessSuccessCodeAsUnknownError = true, class ... DescriptionFormatParams>
void ChsvExceptionByPlatformCode (chsv_syserror_t nCode, const char *restrict pszDescription, DescriptionFormatParams ... format_params)
 Creates an instance of the ChsvCodeExceptionTempl class and throws it as an exception. The instantiation of the ChsvCodeExceptionTempl class template is chosen depending on the result of a translation of the specified operating system error code to the corresponding chsvlib error code. More...
 
template<bool fProcessSuccessCodeAsUnknownError = true, class ... DescriptionFormatParams>
void ChsvExceptionByPlatformCode (chsv_syserror_t nCode, const wchar_t *restrict pszDescription, DescriptionFormatParams ... format_params)
 Creates an instance of the ChsvCodeExceptionTempl class and throws it as an exception. The instantiation of the ChsvCodeExceptionTempl class template is chosen depending on the result of a translation of the specified operating system error code to the corresponding chsvlib error code. More...
 
template<bool fProcessSuccessCodeAsUnknownError = true>
void ChsvExceptionByPlatformCode (chsv_syserror_t nCode)
 
template<bool fProcessSuccessCodeAsUnknownError = true>
void ChsvExceptionByPlatformCode ()
 
void RethrowStdExceptionAsChsvException (std::exception_ptr eptr)
 Tries to rethrow an exception pointed to by the parameter as a predefined exception. If there is no predefined match to the input exception, the function throws the exception as it is. More...
 
template<class E >
void throw_with_nested (E &&e)
 Implements a behaviour of the standard std::throw_with_nested function storing an exception having been caught by a caller and retrieved by a call to the std::current_exception function in the constructed nested_exception object and throwing an exception specified by the only parameter. . More...
 
template<class E >
void rethrow_if_nested (E &&e)
 Implements a behaviour of the standard std::rethrow_if_nested function checking if the most derived dynamic type of the specified exception inherits the nested_exception class and, if that is true, throws an exception stored by the nested_exception object calling nested_exception::rethrow_nested(). If an exception object given by the parameter is not dynamically connected with the nested_exception class through inheritance, the function does nothing. . More...
 

Detailed Description

A namespace for chsvlib generic exception classes and for special helper function.