Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -7,7 +7,9 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"runtime/debug"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -18,7 +20,9 @@ func ExportStatementAgingPDFHandler(_ *sql.DB) http.HandlerFunc {
|
|||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if rec := recover(); rec != nil {
|
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