Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions documentation/release_5.2.htm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ <h3>Changed functionality</h3>
<li>energy resolution functions and keywords have now more documentation. <code>Scanner::check_consistency</code> also checks if the energy resolution is less than 20 (as it is FWHM/reference_energy).
<br /><a href="https://github.com/UCL/STIR/pull/1149/">PR #1149</a>.
</li>
<li>Errors now throw <code>std::runtime_error</code> instead of <code>std::string</code>.
<br /><a href="https://github.com/UCL/STIR/pull/1131/">PR #1131</a>.
</li>
</ul>

<h3>Build system and dependencies</h3>
Expand Down
4 changes: 3 additions & 1 deletion src/buildblock/error.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <string>
#include <iostream>
#include <sstream>
#include <stdexcept>


#include "stir/TextWriter.h"

Expand Down Expand Up @@ -58,6 +60,6 @@ void error(const char *const s, ...)
}
writeText(ss.str().c_str(), ERROR_CHANNEL);
std::string msg = tmp;
throw msg;
throw std::runtime_error(msg);
}
END_NAMESPACE_STIR