summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pexception.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/plib/pexception.h')
-rw-r--r--src/lib/netlist/plib/pexception.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/lib/netlist/plib/pexception.h b/src/lib/netlist/plib/pexception.h
index d3bccbd54ad..a4d3b3c498f 100644
--- a/src/lib/netlist/plib/pexception.h
+++ b/src/lib/netlist/plib/pexception.h
@@ -21,10 +21,10 @@ namespace plib {
class pexception : public std::exception
{
public:
- pexception(const pstring text);
+ explicit pexception(const pstring text);
pexception(const pexception &e) : std::exception(e) { m_text = e.m_text; }
- virtual ~pexception() noexcept {}
+ virtual ~pexception() noexcept;
const pstring &text() { return m_text; }
@@ -36,46 +36,60 @@ class file_e : public plib::pexception
{
public:
explicit file_e(const pstring fmt, const pstring &filename);
+ file_e(const file_e &e) : pexception(e) { }
+ virtual ~file_e() noexcept;
};
class file_open_e : public file_e
{
public:
explicit file_open_e(const pstring &filename);
+ file_open_e(const file_open_e &e) : file_e(e) { }
+ virtual ~file_open_e() noexcept;
};
class file_read_e : public file_e
{
public:
explicit file_read_e(const pstring &filename);
+ file_read_e(const file_read_e &e) : file_e(e) { }
+ virtual ~file_read_e() noexcept;
};
class file_write_e : public file_e
{
public:
explicit file_write_e(const pstring &filename);
+ file_write_e(const file_write_e &e) : file_e(e) { }
+ virtual ~file_write_e() noexcept;
};
class null_argument_e : public plib::pexception
{
public:
explicit null_argument_e(const pstring &argument);
+ null_argument_e(const null_argument_e &e) : pexception(e) { }
+ virtual ~null_argument_e() noexcept;
};
class out_of_mem_e : public plib::pexception
{
public:
explicit out_of_mem_e(const pstring &location);
+ out_of_mem_e(const out_of_mem_e &e) : pexception(e) { }
+ virtual ~out_of_mem_e() noexcept;
};
/* FIXME: currently only a stub for later use. More use could be added by
* using “-fnon-call-exceptions" and sigaction to enable c++ exception supported.
*/
-class fpexception : public pexception
+class fpexception_e : public pexception
{
public:
- fpexception(const pstring &text);
+ fpexception_e(const pstring &text);
+ fpexception_e(const fpexception_e &e) : pexception(e) { }
+ virtual ~fpexception_e() noexcept;
};
static const unsigned FP_INEXACT = 0x0001;