Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Exception: There is no way this will ever be thrown. (What all great developers say) #118

Open
BenjaBobs opened this issue Oct 21, 2019 · 3 comments

Comments

@BenjaBobs
Copy link

So I recently ran into this:

throw allTask.Exception ?? throw new Exception("There is no way this will ever be thrown. (What all great developers say)");

I think it was from doing too many tasks in one go, but there's really no way to be sure without logging the exceptions.

@Elfocrash
Copy link
Owner

What the?
I can't understand how this could happen. Do you have the ApplicationInsights logging enabled?

How can the exception happen but by be null? 😲
Can you reproduce this consistently?

@BenjaBobs
Copy link
Author

I did have Application Insights enabled but there is no information other than the exception message.
It was a very long running request though, >80k upserts, so I think it was an App Service execution time limitation that caused it, but I'm not sure.

Maybe the try-catch should collect the exception messages and put them into the aggregate exception? 😄

@Elfocrash
Copy link
Owner

The thing is that you wouldn't see any exception because for this to be caused the Aggregate Exception was null. I am so confused.

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

No branches or pull requests

2 participants