You've already forked docker-volume-backup
mirror of
https://github.com/offen/docker-volume-backup.git
synced 2025-06-14 22:25:03 +02:00
Panic handling does not log reason for script being halted (#334)
This commit is contained in:
@ -21,6 +21,9 @@ func main() {
|
|||||||
defer func() {
|
defer func() {
|
||||||
if pArg := recover(); pArg != nil {
|
if pArg := recover(); pArg != nil {
|
||||||
if err, ok := pArg.(error); ok {
|
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 {
|
if hookErr := s.runHooks(err); hookErr != nil {
|
||||||
s.logger.Error(
|
s.logger.Error(
|
||||||
fmt.Sprintf("An error occurred calling the registered hooks: %s", hookErr),
|
fmt.Sprintf("An error occurred calling the registered hooks: %s", hookErr),
|
||||||
|
Reference in New Issue
Block a user