mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-21 21:10:26 +01:00
Panic handling does not log reason for script being halted (#334)
This commit is contained in:
parent
810c8871ec
commit
ed5abd5ba8
@ -21,6 +21,9 @@ func main() {
|
||||
defer func() {
|
||||
if pArg := recover(); pArg != nil {
|
||||
if err, ok := pArg.(error); ok {
|
||||
s.logger.Error(
|
||||
fmt.Sprintf("Executing the script encountered a panic: %v", err),
|
||||
)
|
||||
if hookErr := s.runHooks(err); hookErr != nil {
|
||||
s.logger.Error(
|
||||
fmt.Sprintf("An error occurred calling the registered hooks: %s", hookErr),
|
||||
|
Loading…
Reference in New Issue
Block a user