Skip to content

AY 19/20 Sem2 Qn4 : Exceptions Ordering. #389

@Herrekt

Description

@Herrekt

Summary

I know that we should focus on the more specific exceptions to the least specific ones, but if they branch off from the same parent exception, can we clear one whole child exception first before starting on the next?

Description

For example, if we were to catch NoPermissionException, then catch WriteException, before catching ElementNotFoundException and Read Exception, will it be problematic/wrong in this case?

Screenshots (if any):

Capture
Capture1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions