HermesCommon  2.0
Hermes::Exceptions::LengthException Class Reference

Parameter length parameter exception. Internal. Exception occurs when some parameter has wrong length. More...

#include <exceptions.h>

+ Inheritance diagram for Hermes::Exceptions::LengthException:

Public Member Functions

 LengthException (int param_idx, int wrong, int right)
 
 LengthException (int fst_param_idx, int snd_param_idx, int first, int second)
 
int get_first_param_idx () const
 
int get_second_param_idx () const
 
int get_first_length () const
 
int get_expected_length () const
 
 LengthException (const LengthException &e)
 
virtual Exceptionclone ()
 
- Public Member Functions inherited from Hermes::Exceptions::Exception
 Exception ()
 Init exception with default message.
 
 Exception (const char *msg,...)
 
void print_msg () const
 print error message to stderr
 
virtual const char * what () const throw ()
 get pointer to error message
 
const char * get_func_name () const
 

Additional Inherited Members

- Protected Attributes inherited from Hermes::Exceptions::Exception
char * message
 

Detailed Description

Parameter length parameter exception. Internal. Exception occurs when some parameter has wrong length.

Definition at line 92 of file exceptions.h.

Constructor & Destructor Documentation

Hermes::Exceptions::LengthException::LengthException ( int  param_idx,
int  wrong,
int  right 
)

One parameter has wrong length.

Parameters
[in]paramnIdxindex wrong parameter.
[in]wrongactual length of parameter.
[in]rightright length of parameter.

Definition at line 111 of file exceptions.cpp.

Hermes::Exceptions::LengthException::LengthException ( int  fst_param_idx,
int  snd_param_idx,
int  first,
int  second 
)

Two parameters should have same length and they dont have.

Parameters
[in]fstParamnIdxindex first parameter.
[in]sndParamnIdxindex second parameter.
[in]firstactual length of first parameter.
[in]secondactual length of second parameter.

Definition at line 122 of file exceptions.cpp.

Member Function Documentation

int Hermes::Exceptions::LengthException::get_expected_length ( ) const
Returns
expected length of first parameter.

Definition at line 149 of file exceptions.cpp.

int Hermes::Exceptions::LengthException::get_first_length ( ) const
Returns
length of first parameter.

Definition at line 144 of file exceptions.cpp.

int Hermes::Exceptions::LengthException::get_first_param_idx ( ) const
Returns
index of first wrong parameter.

Definition at line 134 of file exceptions.cpp.

int Hermes::Exceptions::LengthException::get_second_param_idx ( ) const
Returns
index of second wrong parameter. Returns -1 when only one parameter is wrong.

Definition at line 139 of file exceptions.cpp.


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