Streams - Added optional path to errors

This commit is contained in:
Emmanuel BENOîT 2017-12-27 19:00:56 +01:00
parent 424ba93472
commit 0651ea28e0
8 changed files with 39 additions and 21 deletions
include/ebcl/inline

View file

@ -10,22 +10,27 @@ namespace ebcl {
/*= X_StreamError ============================================================*/
inline X_StreamError::X_StreamError( E_StreamError e )
: std::exception( ) , error_( e ) , sysError_( -1 )
inline X_StreamError::X_StreamError(
const E_StreamError e ,
T_Optional< T_FSPath > p ) noexcept
: std::exception( ) , error_( e ) , sysError_( -1 ) ,
path_{ std::move( p ) }
{ }
inline X_StreamError::X_StreamError( int error )
: std::exception( ) , error_( E_StreamError::SYSTEM_ERROR ) , sysError_( error )
inline X_StreamError::X_StreamError( const int error ,
T_Optional< T_FSPath > p ) noexcept
: std::exception( ) , error_( E_StreamError::SYSTEM_ERROR ) ,
sysError_( error ) , path_{ std::move( p ) }
{ }
/*----------------------------------------------------------------------------*/
inline E_StreamError X_StreamError::code( ) const
inline E_StreamError X_StreamError::code( ) const noexcept
{
return error_;
}
inline int X_StreamError::systemError( ) const
inline int X_StreamError::systemError( ) const noexcept
{
return sysError_;
}