Skip to content

Commit

Permalink
error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
wjblanke authored and hoffmang9 committed Feb 24, 2021
1 parent dedeffc commit 793170a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/encoding.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class Encoding {
FSE_CTable *ct = FSE_createCTable(maxSymbolValue, tableLog);
size_t err = FSE_buildCTable(ct, nCount.data(), maxSymbolValue, tableLog);
if (FSE_isError(err)) {
throw std::logic_error("FSE_buildDTable failed");
throw FSE_getErrorName(err);
}
tmc.CTAssign(R, ct);
}
Expand Down Expand Up @@ -220,8 +220,8 @@ class Encoding {

FSE_DTable *dt = FSE_createDTable(tableLog);
size_t err = FSE_buildDTable(dt, nCount.data(), maxSymbolValue, tableLog);
if(err != FSE_error_no_error)
throw std::logic_error("FSE_buildDTable failed");
if (FSE_isError(err)) {
throw FSE_getErrorName(err);
tmc.DTAssign(R, dt);
}

Expand Down

0 comments on commit 793170a

Please sign in to comment.