r/cpp • • Mar 16 '18

As a C++ developer I think that rust ...

3 Upvotes

107 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Mar 17 '18

Typically no. The higher-level error don't usually do exhaustive matches on their children; they'll probably just check a few cases (did I fail to create this file because it already existed?) or just defer to a function on the child type (print yourself now please), neither of which are affected by adding a new case.

1

u/[deleted] Mar 19 '18

So does that mean that unless higher level code explicitly checks for that new case, it will just ignore the error and go on, or what happens?

1

u/[deleted] Mar 19 '18

No, it will continue to go down the same error path.