Commit cf5e59e4 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added extra exepction

parent acc50848
...@@ -117,7 +117,11 @@ object ConfigUtils extends Logging { ...@@ -117,7 +117,11 @@ object ConfigUtils extends Logging {
def fileToJson(configFile: File): Json = { def fileToJson(configFile: File): Json = {
logger.debug("Jsonfile: " + configFile) logger.debug("Jsonfile: " + configFile)
val jsonText = scala.io.Source.fromFile(configFile).mkString val jsonText = scala.io.Source.fromFile(configFile).mkString
textToJson(jsonText) try { textToJson(jsonText) }
catch {
case e: IllegalStateException =>
throw new IllegalStateException("The config JSON file is either not properly formatted or not a JSON file, file: " + configFile, e)
}
} }
/** Make json aboject from a file */ /** Make json aboject from a file */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment