Utility functions.
| FileSystemWatcher | = | NativeSupport::FileSystemWatcher |
Base64-encodes the given data. Newlines are removed. This is like `Base64.strict_encode64`, but also works on Ruby 1.8 which doesn‘t have that method.
A wrapper around Thread.new that installs a default exception handler. If an uncaught exception is encountered, it will immediately log the exception and abort the entire program.
Thread#abort_on_exception is also supposed to do that, but the problem is that it is implemented by forwarding the uncaught exception to the main thread, which may not expect that particular exception and may not handle it properly. The exception could be forwarded to the main thread during any point of the main thread‘s execution.
This method requires ‘thread’ and ‘ruby_core_enhancements’. If ‘debug_logging’ is loaded and included in the current module, it will use that for logging.
Returns a string which reports the backtraces for all threads, or if that‘s not supported the backtrace for the current thread.
Print the given exception, including the stack trace, to STDERR.
current_location is a string which describes where the code is currently at. Usually the current class name will be enough. It may be nil.
This method requires ‘ruby_core_enhancements’. If ‘debug_logging’ is loaded and included in the current module, it will use that for logging.