Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -7,7 +7,9 @@ import (
|
||||
"bytes"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -18,7 +20,9 @@ func ExportStatementAgingPDFHandler(_ *sql.DB) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
defer func() {
|
||||
if rec := recover(); rec != nil {
|
||||
http.Error(w, fmt.Sprintf("pdf panic: %v", rec), http.StatusInternalServerError)
|
||||
stack := string(debug.Stack())
|
||||
log.Printf("❌ ExportStatementAgingPDFHandler panic: %v\n%s", rec, stack)
|
||||
http.Error(w, fmt.Sprintf("pdf panic: %v\n%s", rec, stack), http.StatusInternalServerError)
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user