From 2837e915d82e439730624f15bfc8c820475c9d65 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 5 Jan 2010 23:06:31 +0000 Subject: Clean up exceptions. Remove some unused ones like Config_Error. Make Invalid_Argument just a typedef for std::invalid_argument. Make Botan::Exception a typedef for std::runtime_error. Make Memory_Exhaustion a public exception, and use it in other places where memory allocations can fail. --- src/math/gfpmath/point_gfp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/math/gfpmath/point_gfp.cpp') diff --git a/src/math/gfpmath/point_gfp.cpp b/src/math/gfpmath/point_gfp.cpp index f95add9f7..4203a3db3 100644 --- a/src/math/gfpmath/point_gfp.cpp +++ b/src/math/gfpmath/point_gfp.cpp @@ -921,7 +921,7 @@ SecureVector EC2OSP(const PointGFp& point, byte format) } else { - throw Format_Error("illegal point encoding format specification"); + throw Invalid_Argument("illegal point encoding format specification"); } return result; } @@ -1078,7 +1078,7 @@ PointGFp OS2ECP(MemoryRegion const& os, const CurveGFp& curve) } break; default: - throw Format_Error("encountered illegal format specification while decoding point"); + throw Invalid_Argument("encountered illegal format specification while decoding point"); } z = GFpElement(curve.get_p(), BigInt(1)); //assert((x.is_trf_to_mres() && x.is_use_montgm()) || !x.is_trf_to_mres()); -- cgit v1.2.3