Skip to content

Commit

Permalink
fix: replace assert with exceptions (#12)
Browse files Browse the repository at this point in the history
* slowly replacing asserts with exceptions in stream (1)

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* added more exception throwing

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* more asserts removed

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
  • Loading branch information
PeterStaar-IBM authored Aug 23, 2024
1 parent 6d8bc33 commit 6565f32
Show file tree
Hide file tree
Showing 5 changed files with 1,013 additions and 2,456 deletions.
13 changes: 7 additions & 6 deletions src/proj_folders/pdf_library/core/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace pdf_lib

d, d0, d1, Do,

EI, EMC, ET,
EI, EMC, ET, EX,

Tc, Td, TD, Tf, Tj, TJ, TL, Tm,
Ts, Tw, Tz, TS,
Expand Down Expand Up @@ -138,6 +138,7 @@ namespace pdf_lib
case EI : return "EI";
case EMC : return "EMC";
case ET : return "ET";
case EX : return "EX";

case Tc : return "Tc";
case Td : return "Td";
Expand Down Expand Up @@ -227,14 +228,14 @@ namespace pdf_lib
static std::map<std::string, core::operator_type> map = {
{ "b", core::b }, { "B", core::B }, { "b*", core::bS }, { "B*", core::BS},
{ "BDC", core::BDC }, { "BI", core::BI }, { "BMC", core::BMC}, { "BT", core::BT}, { "BX", core::BX},

{ "c", core::c }, { "cm", core::cm}, { "cs", core::cs }, { "CS", core::CS},

{ "d", core::d }, { "d0", core::d0}, { "d1", core::d1 },

{"Do", core::Do},

{ "EI", core::EI }, { "EMC", core::EMC}, {"ET", core::ET},
{ "EI", core::EI }, { "EMC", core::EMC}, {"ET", core::ET}, {"EX", core::EX},

{"Tc", core::Tc}, {"Td", core::Td}, {"TD", core::TD}, {"Tf", core::Tf},
{"Tj", core::Tj}, {"TJ", core::TJ}, {"TL", core::TL}, {"Tm", core::Tm},
Expand Down
185 changes: 0 additions & 185 deletions src/proj_folders/pdf_library/qpdf/parser/cid_cmap.h~

This file was deleted.

2 changes: 0 additions & 2 deletions src/proj_folders/pdf_library/qpdf/parser/fontfile2.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ namespace pdf_lib
catch(...)
{
}

//assert(false);
}

void parser<core::FONTFILE2>::handleObject(QPDFObjectHandle object)
Expand Down
Loading

0 comments on commit 6565f32

Please sign in to comment.