Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tell where the error lies in izpack.yml #6

Open
DavidPerezIngeniero opened this issue Jan 7, 2015 · 2 comments
Open

Tell where the error lies in izpack.yml #6

DavidPerezIngeniero opened this issue Jan 7, 2015 · 2 comments

Comments

@DavidPerezIngeniero
Copy link

A message like this is not very self-explanatory:

[error] (rds/izpack:createXml) org.clapper.sbt.izpack.IzPluginException: null; Can't construct a java object for tag:yaml.org,2002:org.clapper.sbt.izpack.IzPackYamlConfig; exception=Cannot create property=panels for JavaBean=org.clapper.sbt.izpack.IzPackYamlConfig@2a698ad0; Cannot create property=panel for JavaBean=org.clapper.sbt.izpack.Panels@63017af3; Cannot create property=action for JavaBean=org.clapper.sbt.izpack.Panel@11f518d3; Cannot create property=id for JavaBean=org.clapper.sbt.izpack.Action@7552cf3b; Unable to find property 'id' on class: org.clapper.sbt.izpack.Action

I miss at least the line number.

@bmc
Copy link
Owner

bmc commented Jan 9, 2015

I'm not sure this is fixable. I'm using SnakeYaml to do the parsing, so by the time I see the parsed output, the line numbers are gone.

@DavidPerezIngeniero
Copy link
Author

Another case:

 org.clapper.sbt.izpack.IzPluginException: while scanning an alias; expected alphabetic or numeric character, but found but found *
    at org.clapper.sbt.izpack.Util$class.izError(util.scala:87)
    at org.clapper.sbt.izpack.IzPackYamlConfigParser.izError(Yaml.scala:297)
    at org.clapper.sbt.izpack.IzPackYamlConfigParser.parse(Yaml.scala:333)
    at org.clapper.sbt.izpack.IzPack$.org$clapper$sbt$izpack$IzPack$$createXML(IzPack.scala:261)
    at org.clapper.sbt.izpack.IzPack$$anonfun$org$clapper$sbt$izpack$IzPack$$createXMLTask$1.apply(IzPack.scala:237)
    at org.clapper.sbt.izpack.IzPack$$anonfun$org$clapper$sbt$izpack$IzPack$$createXMLTask$1.apply(IzPack.scala:235)
    at scala.Function8$$anonfun$tupled$1.apply(Function8.scala:35)
    at scala.Function8$$anonfun$tupled$1.apply(Function8.scala:34)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)

This isn't very informative either! :-(

I lose the information of the original exception.

 catch {
   case e: Throwable =>
     val e2 = findCorrectException(e)
   if (logLevel == LogLevel.Debug)
     e2.printStackTrace()
   izError(e2.getMessage)
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants