mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-22 13:09:45 +00:00
Proper exception logging in RecipeLoader statements
This commit is contained in:
1 parent
7acca5475f
commit
522ac5b57b
2 files changed
+4
-4
No files matched your search
@@ -21,6 +21,8 @@ object BdLib {
|
||||
def logInfo(msg: String, args: Any*) = log.info(msg.format(args: _*))
|
||||
def logWarn(msg: String, args: Any*) = log.warn(msg.format(args: _*))
|
||||
def logError(msg: String, args: Any*) = log.error(msg.format(args: _*))
|
||||
def logWarnException(msg: String, t: Throwable, args: Any*) = log.warn(msg.format(args: _*), t)
|
||||
def logErrorException(msg: String, t: Throwable, args: Any*) = log.error(msg.format(args: _*), t)
|
||||
|
||||
@EventHandler
|
||||
def preInit(ev: FMLPreInitializationEvent) {
|
||||
|
||||
@@ -332,8 +332,7 @@ class RecipeLoader {
|
||||
case e: StatementError =>
|
||||
BdLib.logError("Error while processing %s: %s", s, e.getMessage)
|
||||
case e: Throwable =>
|
||||
BdLib.logError("Error while processing %s: %s", s, e)
|
||||
e.printStackTrace()
|
||||
BdLib.logErrorException("Error while processing %s", e, s)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -350,8 +349,7 @@ class RecipeLoader {
|
||||
case e: StatementError =>
|
||||
BdLib.logError("Error while processing %s: %s", s, e.getMessage)
|
||||
case e: Throwable =>
|
||||
BdLib.logError("Error while processing %s: %s", s, e)
|
||||
e.printStackTrace()
|
||||
BdLib.logErrorException("Error while processing %s", e, s)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user