aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/bits.icc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/bits.icc')
-rw-r--r--libqpdf/bits.icc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libqpdf/bits.icc b/libqpdf/bits.icc
index 465bf5b9..e6abdf0e 100644
--- a/libqpdf/bits.icc
+++ b/libqpdf/bits.icc
@@ -3,8 +3,8 @@
#define __BITS_CC__
#include <algorithm>
+#include <stdexcept>
#include <qpdf/QTC.hh>
-#include <qpdf/QEXC.hh>
#include <qpdf/Pipeline.hh>
// These functions may be run at places where the function call
@@ -28,11 +28,11 @@ read_bits(unsigned char const*& p, unsigned int& bit_offset,
if (bits_wanted > bits_available)
{
- throw QEXC::General("overflow reading bit stream");
+ throw std::length_error("overflow reading bit stream");
}
if (bits_wanted > 32)
{
- throw QEXC::Internal("read_bits: too many bits requested");
+ throw std::out_of_range("read_bits: too many bits requested");
}
unsigned long result = 0;
@@ -99,7 +99,7 @@ write_bits(unsigned char& ch, unsigned int& bit_offset,
{
if (bits > 32)
{
- throw QEXC::Internal("write_bits: too many bits requested");
+ throw std::out_of_range("write_bits: too many bits requested");
}
// bit_offset + 1 is the number of bits left in ch