Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Create standardized, interpretable exceptions for error reporting #420
I think that #297 is indicative of a slightly larger problem -- the way it manifests is that, when you run
The challenge isn't just to catch this error condition earlier, it's to throw exceptions whose names/messages are interpretable to the end-user. So, for example, we could have an UnmappedException exception, which is thrown whenever "something that should be mappable, isn't."
Other ideas for exceptions --
referenced this issue
Oct 15, 2014
@tdanford this sounds like a heavyweight fix where a lightweight fix would do. If we throw an NPE when we create a reference mapping for a read that is unmapped, it would be sufficient check whether the read is mapped, and to throw an IllegalArgumentException if the read is unmapped which clearly states that the read is unmapped.
To clarify my opinions, I don't have any problems with custom exceptions; it's just that
Yeah, I initially used an IAE for the other fix.
I don't think this needs to be "skynet," just some standardized bioinformatics-specific names for exceptions that we could throw. Otherwise, you're packing it all into the message of the IllegalArgumentException and (it seems to me) you'll end up regex'ing it out sometimes.
I dunno. Just a thought.
+1; I think this:
Is a reasonable goal.
Any idea of what exceptions you would like? I think we could fold: