Ruby does not provide a method to print exceptions exactly the same way it does, so here's a hack to return a string representing an exception plus backtrace, in printable form.
|exc||the exception to print|
Returns: a string representing the exception and its backtrace
Print an exception, the same way Ruby does it.
|exc||the exception to print.|
|out||the IO object to print to.|