Add ability to log to an io.Writer when a panic occurs

Conflicts:
	errorhandling/errorhandling.go