summaryrefslogtreecommitdiffstats
path: root/general/Frac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'general/Frac.cpp')
-rw-r--r--general/Frac.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/general/Frac.cpp b/general/Frac.cpp
index 74d76881..539205ef 100644
--- a/general/Frac.cpp
+++ b/general/Frac.cpp
@@ -4,7 +4,7 @@
// Author: Ben Boeckel
// Modified by: Ben Boeckel
// Created: Sun Mar 18 15:25:16 2007
-// Copyright: ©2007 Nerdy Productions
+// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions
// Licence:
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
#include "Frac.h"
-void PokeGen::Frac::set(const unsigned n, const unsigned d)
+void PokeGen::Frac::set(const unsigned n, const unsigned d) throw(Exception)
{
if ((type == Improper) || ((n < d) && (type == Proper)) || ((d < n) && (type == Over1)))
{
@@ -30,26 +30,26 @@ void PokeGen::Frac::set(const unsigned n, const unsigned d)
denom = d;
}
else
- throw("Frac: values conflict with type");
+ throw(Exception("Frac", "values conflict with type"));
}
-void PokeGen::Frac::set(const unsigned n, const unsigned d, const unsigned t)
+void PokeGen::Frac::set(const unsigned n, const unsigned d, const unsigned t) throw(Exception)
{
setType(t);
set(n, d);
}
-void PokeGen::Frac::setNum(const unsigned n)
+void PokeGen::Frac::setNum(const unsigned n) throw(Exception)
{
set(n, denom);
}
-void PokeGen::Frac::setDenom(const unsigned d)
+void PokeGen::Frac::setDenom(const unsigned d) throw(Exception)
{
set(num, d);
}
-void PokeGen::Frac::setType(const unsigned t)
+void PokeGen::Frac::setType(const unsigned t) throw(BoundsException)
{
if (t < End)
{
@@ -57,7 +57,7 @@ void PokeGen::Frac::setType(const unsigned t)
set(1, 1);
}
else
- throw("Frac: type out of range");
+ throw(BoundsException("Frac", "type"));
}
void PokeGen::Frac::reduce()