Mar-06-2021, 08:42 PM
it is a commonly suggested idea to just let lower level code produce exceptions and let them propagate up to the caller that needs to handle them. but what if a function has 2 or 3 different lower level calls that could produce the same exception?
i'm working on a function to move a file object to inside of a target directory, creating that dictionary if needed. there are 3 contexts for exceptions like FileNotFoundError or PermissionError. it may refer to the file object to be moved. it might refer to the target dictionary. maybe it refers to creating the target directory.
how might such a function reveal the context of the error?
i'm working on a function to move a file object to inside of a target directory, creating that dictionary if needed. there are 3 contexts for exceptions like FileNotFoundError or PermissionError. it may refer to the file object to be moved. it might refer to the target dictionary. maybe it refers to creating the target directory.
how might such a function reveal the context of the error?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.