Skip to content

Commit

Permalink
improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
gisogrimm committed Dec 3, 2024
1 parent 4457fa0 commit fe7a875
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions libtascar/src/jackclient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static std::string errmsg("");
static void jack_report_error(const char* msg)
{
std::cerr << msg << std::endl;
if( errmsg.size() )
if(errmsg.size())
errmsg += "\n";
errmsg += msg;
}
Expand Down Expand Up @@ -80,7 +80,7 @@ jackc_portless_t::jackc_portless_t(const std::string& clientname)
err += "Unable to access shared memory. ";
if(jstat & JackVersionError)
err += "Client's protocol version does not match. ";
if( errmsg.size() )
if(errmsg.size())
err += "\n" + errmsg;
throw TASCAR::ErrMsg(err);
}
Expand Down Expand Up @@ -606,7 +606,10 @@ jackc_db_t::jackc_db_t(const std::string& clientname, jack_nframes_t infragsize)
if(0 != jack_client_create_thread(jc, &inner_thread,
std::max(-1, rtprio - 1), (rtprio > 0),
service, this))
throw TASCAR::ErrMsg("Unable to create inner processing thread.");
throw TASCAR::ErrMsg(
"Unable to create inner processing thread with priority " +
TASCAR::to_string(std::max(-1, rtprio - 1)) +
" - check realtime settings.");
} else {
// check for integer ratio:
ratio = fragsize / inner_fragsize;
Expand Down
2 changes: 1 addition & 1 deletion libtascar/src/session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ TASCAR::actor_module_t::actor_module_t(const TASCAR::module_cfg_t& cfg,
obj = session->find_objects(actor);
if(fail_on_empty && obj.empty())
throw TASCAR::ErrMsg("No object matches actor pattern \"" +
vecstr2str(actor) + "\".");
vecstr2str(actor) + "\" (attribute \"actor\")");
}

TASCAR::actor_module_t::~actor_module_t() {}
Expand Down

0 comments on commit fe7a875

Please sign in to comment.