mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 17:10:10 +00:00
lang: report section error comes from
doesn't directly report which file caused the error, but this is close enough.
This commit is contained in:
parent
28ca02272c
commit
016263894f
@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
@ -779,22 +780,27 @@ type Lang struct {
|
|||||||
func (st *Storage) loadLang(filesystems ...fs.FS) (err error) {
|
func (st *Storage) loadLang(filesystems ...fs.FS) (err error) {
|
||||||
err = st.loadLangCommon(filesystems...)
|
err = st.loadLangCommon(filesystems...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
err = fmt.Errorf("common: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = st.loadLangAdmin(filesystems...)
|
err = st.loadLangAdmin(filesystems...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
err = fmt.Errorf("admin: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = st.loadLangEmail(filesystems...)
|
err = st.loadLangEmail(filesystems...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
err = fmt.Errorf("email: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = st.loadLangUser(filesystems...)
|
err = st.loadLangUser(filesystems...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
err = fmt.Errorf("user: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = st.loadLangPWR(filesystems...)
|
err = st.loadLangPWR(filesystems...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
err = fmt.Errorf("pwr: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = st.loadLangTelegram(filesystems...)
|
err = st.loadLangTelegram(filesystems...)
|
||||||
|
Loading…
Reference in New Issue
Block a user