-
Notifications
You must be signed in to change notification settings - Fork 17
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
Verify uses of exceptionFree in ExecuteSessionUpdate #252
Comments
Actually, |
I think buildExe should not throw exceptions. I even catch some and print them to the stderr log file. But it wouldn't hurt double checking, especially for the other tools (I've just caught and fixed that in haddock generation a couple days ago). |
Actually, I only catch IOExceptions in buildExe. So, if something really bad happens, an exception can get through. If needed, I can catch all exceptions and log them in the stderr log file. |
Aren't there some calls to "error" in there somewhere? Or "fail"? Or both? |
Countless (in the tools' codebase). |
No, that's not what I mean. In errors = case toLazyMaybe mcomputed of
Nothing ->
error "This session state does not admit artifact generation."
Just Computed{computedErrors} -> toLazyList computedErrors and when (not configGenerateModInfo) $
-- TODO: replace the check with an inspection of state component (#87)
fail "Features using cabal API require configGenerateModInfo, currently (#86)." |
I must have missed the context. I call many of the tools as libraries, so the exceptions from 'error' calls get through and not as |
I'm confused. I'm saying that |
I guess my point was we may eliminate those, but we can't (easily) do that in libraries. That's why I didn't guess you mean our code exclusively. |
Well, we need to catch exceptions thrown by the library, although yes, of course, deeply nested calls to It just seems rather counter-productive to try and catch exceptions thrown by the libraries, because we don't want to interrupt the execution of the session update, but then throw some exceptions of our own? |
Another one is here (called in executeBuildExe)
|
See #251 for details.
Some of these should be verified by me, others by @Mikolaj .
The text was updated successfully, but these errors were encountered: