aboutsummaryrefslogtreecommitdiffstats
path: root/src/sls.cpp
diff options
context:
space:
mode:
authorStefan Pöschel <github@basicmaster.de>2017-08-23 17:13:34 +0200
committerStefan Pöschel <github@basicmaster.de>2017-08-23 17:13:34 +0200
commitf39a8abc2293ad73a490552227c37f079c0f4e19 (patch)
tree2d3f09545bb37b196b75b6d5d9ec0699c4dab1f9 /src/sls.cpp
parentaa45b70efb3d236b313527022dad7ef27eacdae0 (diff)
downloadODR-PadEnc-f39a8abc2293ad73a490552227c37f079c0f4e19.tar.gz
ODR-PadEnc-f39a8abc2293ad73a490552227c37f079c0f4e19.tar.bz2
ODR-PadEnc-f39a8abc2293ad73a490552227c37f079c0f4e19.zip
Improve perror usage
Diffstat (limited to 'src/sls.cpp')
-rw-r--r--src/sls.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sls.cpp b/src/sls.cpp
index aa0167f..f059114 100644
--- a/src/sls.cpp
+++ b/src/sls.cpp
@@ -121,7 +121,7 @@ bool SlideStore::InitFromDir(const std::string& dir) {
struct dirent** dir_entries;
int dir_count = scandir(dir.c_str(), &dir_entries, FilterSlides, alphasort);
if(dir_count < 0) {
- perror("ODR-PadEnc Error: cannot open slides directory");
+ perror(("ODR-PadEnc Error: cannot open slides directory '" + dir + "'").c_str());
return false;
}
@@ -462,8 +462,7 @@ bool SLSManager::encodeFile(const std::string& fname, int fidx, bool raw_slides)
// read file
FILE* pFile = fopen(fname.c_str(), "rb");
if (pFile == NULL) {
- fprintf(stderr, "ODR-PadEnc Error: Unable to load file '%s'\n",
- fname.c_str());
+ perror(("ODR-PadEnc Error: Unable to load file '" + fname + "'").c_str());
goto encodefile_out;
}