From b9e19e076662ae5743b9c81eb238fe11204f6dbd Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 12 Apr 2009 19:06:50 +0000 Subject: Add some comments. --- libdimensionxx/dimensionxx/error.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libdimensionxx/dimensionxx/error.hpp') diff --git a/libdimensionxx/dimensionxx/error.hpp b/libdimensionxx/dimensionxx/error.hpp index 8919895..99670cb 100644 --- a/libdimensionxx/dimensionxx/error.hpp +++ b/libdimensionxx/dimensionxx/error.hpp @@ -21,21 +21,29 @@ #ifndef DIMENSIONXX_ERROR_HPP #define DIMENSIONXX_ERROR_HPP +// Wrappers for libdimension error handling, and an exception class. +// dmnsn_error is still used by libdimensionxx whenever an exception shouldn't +// be thrown, like in destructors, and whenever libdimension or libdimension-* +// use it internally. Exceptions are thrown otherwise to report errors. + #include #include #include namespace Dimension { + // Wrapper for dmnsn_severity enum Severity { SEVERITY_LOW = DMNSN_SEVERITY_LOW, SEVERITY_MEDIUM = DMNSN_SEVERITY_MEDIUM, SEVERITY_HIGH = DMNSN_SEVERITY_HIGH }; + // Get or set the resilience, thread-safely Severity resilience(); void resilience(Severity resilience); + // Generic exception class, derives from std::runtime_error class Dimension_Error : public std::runtime_error { public: -- cgit v1.2.3