Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 47ac1f85ff38
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 915978c34e07
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jun 19, 2015

  1. Added log of exit status.

    brixen committed Jun 19, 2015
    Copy the full SHA
    1b3f07d View commit details

Commits on Jun 20, 2015

  1. Copy the full SHA
    915978c View commit details
Showing with 11 additions and 9 deletions.
  1. +5 −4 vm/environment.cpp
  2. +6 −5 vm/exception.cpp
9 changes: 5 additions & 4 deletions vm/environment.cpp
Original file line number Diff line number Diff line change
@@ -133,10 +133,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();
}
@@ -585,6 +584,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()) {
11 changes: 6 additions & 5 deletions vm/exception.cpp
Original file line number Diff line number Diff line change
@@ -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();
}
@@ -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;
}
}
@@ -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;
}
}