mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-08 12:11:03 +08:00
feat: improve error message for GetConfigInt64()
This commit is contained in:
@@ -66,7 +66,11 @@ func GetConfigBool(key string) bool {
|
|||||||
func GetConfigInt64(key string) (int64, error) {
|
func GetConfigInt64(key string) (int64, error) {
|
||||||
value := GetConfigString(key)
|
value := GetConfigString(key)
|
||||||
num, err := strconv.ParseInt(value, 10, 64)
|
num, err := strconv.ParseInt(value, 10, 64)
|
||||||
return num, err
|
if err != nil {
|
||||||
|
return 0, fmt.Errorf("GetConfigInt64(%s) error, %s", key, err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
return num, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetConfigDataSourceName() string {
|
func GetConfigDataSourceName() string {
|
||||||
|
Reference in New Issue
Block a user