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

"WARNING: doo's init function was not set" is misleading #122

Closed
thedavidmeister opened this issue Nov 5, 2016 · 9 comments
Closed

"WARNING: doo's init function was not set" is misleading #122

thedavidmeister opened this issue Nov 5, 2016 · 9 comments

Comments

@thedavidmeister
Copy link

(defn ^:export run! [a]
  (try
    (*main-cli-fn* a)
    (catch :default e
      (println "WARNING: doo's init function was not set")
      (println e)
      (exit! false))))

This just means that literally any error will print this warning, it does not mean that the init function wasn't set.

@bensu
Copy link
Owner

bensu commented Nov 6, 2016

Hi,

Thanks for the report. Can you show me an example of an error and its cause that was unrelated to the message? It would be helpful to decide where/if to put that message.

@thedavidmeister
Copy link
Author

@bensu I literally just had an error in my own code. The cause was a mistake i made.

@bensu
Copy link
Owner

bensu commented Jan 14, 2017

Hi,

Great! Can you give me a small project that shows that error?

@laurentsenta
Copy link

laurentsenta commented May 5, 2017

https://xkcd.com/979/

I get the same warning in my tests.

@bensu
Copy link
Owner

bensu commented May 11, 2017

Hi @Isenta

Would you mind providing a repo that shows the error?

@laurentsenta
Copy link

laurentsenta commented May 11, 2017

Hi @bensu I put some details in: #134

@thedavidmeister
Copy link
Author

this looks like an example #141

@MatthewDarling
Copy link
Contributor

In terms of improving the messaging here, is there more than (println e) that is specific to the actual problem that happened? I tried (println (.-stack e)) but I don't know if that works in all environments.

I've opened #151 to avoid printing the "init function was not set" when it doesn't apply. But if there's other low-hanging fruit to improve the default exception handler, now's a good time to address that :)

@miikka
Copy link
Collaborator

miikka commented Mar 3, 2018

I think that PR #151 (included in release 0.1.8) addressed this issue, so I'll close this.

@miikka miikka closed this as completed Mar 3, 2018
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

5 participants