mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-28 16:45:32 +00:00
better logging
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package templating
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io/fs"
|
||||
"sync"
|
||||
|
||||
"github.com/Theodor-Springmann-Stiftung/kgpz_web/helpers"
|
||||
"github.com/yalue/merged_fs"
|
||||
)
|
||||
|
||||
@@ -36,10 +36,7 @@ func (r *LayoutRegistry) Register(fs fs.FS) *LayoutRegistry {
|
||||
func (r *LayoutRegistry) Load() error {
|
||||
r.once.Do(func() {
|
||||
err := r.load()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
panic(-1)
|
||||
}
|
||||
helpers.Assert(err, "Error loading layouts. Exiting.")
|
||||
})
|
||||
|
||||
return nil
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package templating
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io/fs"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/Theodor-Springmann-Stiftung/kgpz_web/helpers"
|
||||
"github.com/yalue/merged_fs"
|
||||
)
|
||||
|
||||
@@ -36,10 +36,7 @@ func (r *TemplateRegistry) Register(path string, fs fs.FS) *TemplateRegistry {
|
||||
func (r *TemplateRegistry) Load() error {
|
||||
r.once.Do(func() {
|
||||
err := r.load()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
panic(-1)
|
||||
}
|
||||
helpers.Assert(err, "Error loading templates. Exiting.")
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user