summaryrefslogtreecommitdiffstats
path: root/src/lib/netlist/plib/pexception.h
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2017-01-05 01:43:12 +0100
committer couriersud <couriersud@arcor.de>2017-01-05 01:43:31 +0100
commit02c3f45bff27e8ca27d5f68f52c816e5f055eadf (patch)
treef647ed591e5997496a6bb0ff3dc28fb887534f1f /src/lib/netlist/plib/pexception.h
parent67841056dae03d2e8f418b3be7150701c705d6b5 (diff)
Fix clang "-Wno-weak-vtables" warnings in netlist source. Refactored
code along the way. (nw)
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;