Skip to content

Consistent error messages #1159

Discussion options

You must be logged in to vote

Actually this is a good point. I think the intention at the time was to make clear that the message comes from the fake fs, to distinguish them from accidental access to the real fs (but you will see this anyway in the callstack). Also, having the addition at the end makes it possible to check the error messages using startswith.

But - as you have noticed, this is not consistent, because there are several places where the exception is not raised using the method to raise an OS exception, as is the case here.
Note also that in this case the capitalization differs - this is because in the first (passing) case the message has been hard-coded, while in the second case in is taken using os.str…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by nicolashainaux
Comment options

You must be logged in to vote
1 reply
@mrbean-bremen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants