gofmt, remove trailing spaces.
Refactor: extract common method.
Cache hostname and project root, allow to change.
Allow to set environment.
Fix backtrace extraction.
Refactor tests.
Handle any panic, not just error and string.