Convert panic() calls to more specific, overrideable methods.