I'm not sure, but I think will be better to write such errors to stderr, i.e.
```
$stderr.puts "Error: #{exception.inspect}"
```