Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into 1.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Jun 20, 2015
2 parents 8edd7cf + 915978c commit d9d8b4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions vm/environment.cpp
Expand Up @@ -132,10 +132,9 @@ namespace rubinius {
}

void cpp_exception_bug() {
std::cerr << "[BUG] Uncaught C++ internal exception\n";
std::cerr << "So sorry, it appears that you've encountered an internal\n";
std::cerr << "bug. Please report this on the rubinius issue tracker.\n";
std::cerr << "Include the following backtrace in the issue:\n\n";
utilities::logger::fatal("[BUG: Uncaught C++ exception]");
utilities::logger::fatal("Please report this with the following backtrace to " \
"https://github.com/rubinius/rubinius/issues");

rubinius::abort();
}
Expand Down Expand Up @@ -579,6 +578,8 @@ namespace rubinius {
void Environment::halt(STATE) {
utilities::thread::Mutex::LockGuard guard(halt_lock_);

utilities::logger::write("exiting: %s %d", shared->pid.c_str(), exit_code(state));

state->shared().tool_broker()->shutdown(state);

if(ObjectMemory* om = state->memory()) {
Expand Down
11 changes: 6 additions & 5 deletions vm/exception.cpp
Expand Up @@ -117,26 +117,25 @@ namespace rubinius {
}

void abort() {
std::cout << "Abort!" << std::endl;
utilities::logger::fatal("The Rubinius process is aborting");
print_backtrace();
::abort();
}

void bug(const char* message) {
std::cerr << "[BUG: " << message << "]\n";
utilities::logger::fatal("[BUG: %s]", message);
print_backtrace();
::abort();
}

void bug(const char* message, const char* arg) {
std::cerr << "[BUG: " << message
<< ": " << arg
<< "]\n";
utilities::logger::fatal("[BUG: %s: %s]", message, arg);
print_backtrace();
::abort();
}

void warn(const char* message) {
utilities::logger::warn("[WARNING: %s]", message);
std::cerr << "[WARNING: " << message << "]\n";
print_backtrace();
}
Expand All @@ -146,6 +145,7 @@ namespace rubinius {
demangle(s);

for(size_t i = 0; i < s.size(); i++) {
utilities::logger::warn("%s", s[i].c_str());
std::cout << s[i] << std::endl;
}
}
Expand Down Expand Up @@ -185,6 +185,7 @@ namespace rubinius {
if(!backtrace) return;

for(size_t i = 0; i < backtrace->size(); i++) {
utilities::logger::warn("%s", backtrace->at(i).c_str());
std::cout << backtrace->at(i) << std::endl;
}
}
Expand Down

0 comments on commit d9d8b4c

Please sign in to comment.