diff options
author | John Hodge <tpg@mutabah.net> | 2017-10-01 11:36:47 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2017-11-18 14:05:36 +0800 |
commit | f8b8db3a31782fcff7a58c6fe8b3849d92619d51 (patch) | |
tree | a85b7527d4962a9eff6ee15b51f3dba9b398da80 | |
parent | 93b2f79938859684ff0c18fab1eddb200f48cbf8 (diff) | |
download | mrust-f8b8db3a31782fcff7a58c6fe8b3849d92619d51.tar.gz |
Span - Don't abort() on errors on windows
-rw-r--r-- | src/span.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/span.cpp b/src/span.cpp index d173ceb7..579f0df0 100644 --- a/src/span.cpp +++ b/src/span.cpp @@ -64,7 +64,11 @@ void Span::bug(::std::function<void(::std::ostream&)> msg) const void Span::error(ErrorType tag, ::std::function<void(::std::ostream&)> msg) const { print_span_message(*this, [&](auto& os){os << "error:" << tag;}, msg); +#ifndef _WIN32 abort(); +#else + exit(1); +#endif } void Span::warning(WarningType tag, ::std::function<void(::std::ostream&)> msg) const { print_span_message(*this, [&](auto& os){os << "warning" << tag;}, msg); |