Skip to content

Commit

Permalink
job status code in error message #41
Browse files Browse the repository at this point in the history
Add job status code in error message, if not defined.  #41
  • Loading branch information
tojocky committed Feb 9, 2015
1 parent d4f465f commit bdf44a1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/node_printer_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <string>
#include <map>
#include <utility>
#include <sstream>

#include <cups/cups.h>

Expand Down Expand Up @@ -101,9 +102,9 @@ namespace
if(i_status == 0)
{
// A new status? return error then
std::string error_str("wrong job status: ");
error_str += job->state;
return error_str;
std::ostringstream s;
s << "wrong job status: " << job->state;
return s.str();
}

result_printer_job->Set(V8_STRING_NEW_UTF8("status"), result_printer_job_status);
Expand Down

0 comments on commit bdf44a1

Please sign in to comment.