Skip to content

Commit

Permalink
Simplified error on RAWRead.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Sep 24, 2023
1 parent f388321 commit e556bff
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions lib/tlIO/RAWRead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
if (ret) \
{ \
throw std::runtime_error( \
string::Format("{0}: {1} - {2}") \
.arg(fileName) \
string::Format("{0} - {1}") \
.arg(#function) \
.arg(libraw_strerror(ret))); \
}
Expand Down Expand Up @@ -214,24 +213,17 @@ namespace tl
if (!image)
{
throw std::runtime_error(
string::Format("{0}: {1}")
.arg(fileName)
.arg("dcraw_make_mem_image returne null"));
"dcraw_make_mem_image returned null");
}

if (image->type != LIBRAW_IMAGE_BITMAP)
{
throw std::runtime_error(
string::Format("{0}: {1}")
.arg(fileName)
.arg("Not a bitmap image"));
throw std::runtime_error("Not a bitmap image");
}
if (image->colors != 3 && image->colors != 1)
{
throw std::runtime_error(
string::Format("{0}: {1}")
.arg(fileName)
.arg("Not supported color depth"));
"Not supported color depth");
}

if (image->colors == 3)
Expand Down

0 comments on commit e556bff

Please sign in to comment.