Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-168

Ini parse errors return a non-obvious error

    Details

    • Type: Improvement
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:
    • Story Points:
      2

      Description

      When there is a problem with the inifile, the error is fairly ugly:

      <pre>
      2013-02-18 12:19:15,474 ERROR [puppetlabs.utils] Uncaught exception
      org.ini4j.InvalidFileFormatException: parse error (at line: 6): host 0.0.0.0
      at org.ini4j.spi.AbstractParser.parseError(AbstractParser.java:53)
      at org.ini4j.spi.AbstractParser.parseOptionLine(AbstractParser.java:85)
      at org.ini4j.spi.IniParser.parse(IniParser.java:101)
      at org.ini4j.spi.IniParser.parse(IniParser.java:62)
      at org.ini4j.Ini.load(Ini.java:109)
      at org.ini4j.Ini.<init>(Ini.java:50)
      at com.puppetlabs.utils$ini_to_map.invoke(utils.clj:238)
      at clojure.core$map$fn__4087.invoke(core.clj:2434)
      at clojure.lang.LazySeq.sval(LazySeq.java:42)
      at clojure.lang.LazySeq.seq(LazySeq.java:60)
      at clojure.lang.Cons.next(Cons.java:39)
      at clojure.lang.RT.next(RT.java:587)
      at clojure.core$next.invoke(core.clj:64)
      at clojure.core$reduce1.invoke(core.clj:880)
      at clojure.core$reduce1.invoke(core.clj:871)
      at clojure.core$merge.doInvoke(core.clj:2631)
      at clojure.lang.RestFn.applyTo(RestFn.java:137)
      at clojure.core$apply.invoke(core.clj:601)
      at com.puppetlabs.utils$inis_to_map.invoke(utils.clj:265)
      at com.puppetlabs.utils$inis_to_map.invoke(utils.clj:256)
      at com.puppetlabs.puppetdb.cli.services$parse_config_BANG_.invoke(services.clj:293)
      at com.puppetlabs.puppetdb.cli.services$_main.doInvoke(services.clj:311)
      at clojure.lang.RestFn.invoke(RestFn.java:421)
      at clojure.lang.Var.invoke(Var.java:419)
      at clojure.lang.AFn.applyToHelper(AFn.java:163)
      at clojure.lang.Var.applyTo(Var.java:532)
      at clojure.core$apply.invoke(core.clj:601)
      at com.puppetlabs.puppetdb.core$_main.doInvoke(core.clj:79)
      at clojure.lang.RestFn.applyTo(RestFn.java:137)
      at com.puppetlabs.puppetdb.core.main(Unknown Source)
      </pre>

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  redmine.exporter redmine.exporter
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated: