summaryrefslogtreecommitdiff
path: root/src/exceptions.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-11-29 16:50:18 -0500
committerkwolekr <kwolekr@minetest.net>2014-11-29 16:52:45 -0500
commit25945dc5395a03cab069ff0e6470ba8d59b03978 (patch)
tree63b413140814c90197d55326e1d65b2672c978da /src/exceptions.h
parenta3e019c4f6745d06d7afed7991b9c682b0ea65b9 (diff)
downloadminetest-25945dc5395a03cab069ff0e6470ba8d59b03978.tar.gz
minetest-25945dc5395a03cab069ff0e6470ba8d59b03978.tar.bz2
minetest-25945dc5395a03cab069ff0e6470ba8d59b03978.zip
noise: Throw exception on noise allocation failure
Diffstat (limited to 'src/exceptions.h')
-rw-r--r--src/exceptions.h12
1 files changed, 12 insertions, 0 deletions
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: