VR-Vantage 3.1 API Documentation
Home
Modules
Namespaces
Classes
Files
Libraries
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
sensorFx
include
JrmException.hpp
Go to the documentation of this file.
1
24
#ifndef JRM_EXCEPTION_HPP
25
#define JRM_EXCEPTION_HPP
26
27
#include <string>
28
#include <exception>
29
30
//Define a general namespace for simple utility classes and functions
31
namespace
jrm {
32
37
class
JrmException
:
public
std::exception{
//this may need to be set outside of block, since other files may use it, even though turned off...
38
public
:
39
JrmException
() :
m_what
(
"JRM Exception occurred. Default text."
),
m_code
(0) {}
//not ansi : std::exception()
40
JrmException
(
const
char
*
const
&
s
) :
m_what
(s),
m_code
(0) {}
//not ansi : std::exception(s)
41
JrmException
(
const
char
*
const
&
s
,
int
i) :
m_what
(s),
m_code
(i){}
//not ansi : std::exception(s, i)
42
JrmException
(
const
JrmException
& ex) : std::exception(ex),
m_what
(ex.
m_what
),
m_code
(ex.
m_code
){}
43
JrmException
&
operator=
(
const
JrmException
& rhs) {
if
(
this
== &rhs)
return
(*
this
);
std::exception::operator=
(rhs);
m_what
= rhs.
m_what
;
m_code
= rhs.
m_code
;
return
(*
this
);}
44
virtual
const
char
*
what
()
const
throw() {
return
(
m_what
.c_str());}
45
virtual
~JrmException
() throw() {}
46
private
:
47
std::string
m_what
;
//can throw stl exceptions. replace later with exception proof class
48
int
m_code
;
49
};
//JrmException
50
51
}
52
53
#endif // JRM_EXCEPTION_HPP
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (
www.mak.com
)