|
|
@ -1,12 +1,15 @@
|
|
|
|
package main
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
|
|
|
|
"fmt"
|
|
|
|
"html/template"
|
|
|
|
"html/template"
|
|
|
|
"log"
|
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/hrfee/jfa-go/logger"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/pkg/browser"
|
|
|
|
"github.com/pkg/browser"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -23,7 +26,7 @@ func Exit(err interface{}) {
|
|
|
|
"SanitizedLog": sanitized,
|
|
|
|
"SanitizedLog": sanitized,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
data["Err"] = err
|
|
|
|
data["Err"] = fmt.Sprintf("%s %v", logger.Lshortfile(), err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fpath := filepath.Join(temp, "jfa-go-crash-"+time.Now().Local().Format("2006-01-02T15:04:05"))
|
|
|
|
fpath := filepath.Join(temp, "jfa-go-crash-"+time.Now().Local().Format("2006-01-02T15:04:05"))
|
|
|
|
err2 = os.WriteFile(fpath+".txt", []byte(logCache), 0666)
|
|
|
|
err2 = os.WriteFile(fpath+".txt", []byte(logCache), 0666)
|
|
|
|