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

Halt on exception while initializing #6

Open
mathias opened this issue Nov 30, 2013 · 1 comment
Open

Halt on exception while initializing #6

mathias opened this issue Nov 30, 2013 · 1 comment

Comments

@mathias
Copy link

mathias commented Nov 30, 2013

When I try to initialize with bad config, I get:

java.lang.IllegalArgumentException: :db.error/invalid-db-uri Invalid database URI datomic:pro://localhost:4334/remembrance
[snip 30+ lines of stacktrace]
Database initialized.

Thinking at the very least it should not say "Database initialized." if any exceptions were hit. Maybe not try to continue on to later steps, as well?

@mathias
Copy link
Author

mathias commented Dec 23, 2013

Also ran into some similar stuff today while switching storage engines:

$ lein datomic initialize
java.lang.IllegalArgumentException: :db.error/invalid-db-uri Invalid database URI datomic:pro://localhost:4334/rem
embrance
        at datomic.error$arg.invoke(error.clj:55)
        at datomic.error$arg.invoke(error.clj:53)
        at datomic.uri$parse_db.invoke(uri.clj:51)
        at datomic.peer$delete_database.invoke(peer.clj:631)
        at clojure.lang.Var.invoke(Var.java:415)
        at datomic.Peer.deleteDatabase(Peer.java:106)
        at datomic.api$delete_database.invoke(api.clj:23)
        at user$eval7.invoke(form-init3597869633216966307.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6619)
        at clojure.lang.Compiler.eval(Compiler.java:6609)
        at clojure.lang.Compiler.load(Compiler.java:7064)
        at clojure.lang.Compiler.loadFile(Compiler.java:7020)
        at clojure.main$load_script.invoke(main.clj:294)
        at clojure.main$init_opt.invoke(main.clj:299)
        at clojure.main$initialize.invoke(main.clj:327)
        at clojure.main$null_opt.invoke(main.clj:362)
        at clojure.main$main.doInvoke(main.clj:440)
        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.main.main(main.java:37)
Database initialized.

Sure, my config was wrong, but I think that if an exception gets thrown, the tool shouldn't output "Database initialized"

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

1 participant