From 25945dc5395a03cab069ff0e6470ba8d59b03978 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sat, 29 Nov 2014 16:50:18 -0500 Subject: noise: Throw exception on noise allocation failure --- src/exceptions.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/exceptions.h') diff --git a/src/exceptions.h b/src/exceptions.h index 6d6ad333a..abd8c68ae 100644 --- a/src/exceptions.h +++ b/src/exceptions.h @@ -125,6 +125,18 @@ public: Some "old-style" interrupts: */ +class InvalidNoiseParamsException : public BaseException { +public: + InvalidNoiseParamsException(): + BaseException("One or more noise parameters were invalid or require " + "too much memory") + {} + + InvalidNoiseParamsException(const std::string &s): + BaseException(s) + {} +}; + class InvalidPositionException : public BaseException { public: -- cgit v1.2.3