Dec-20-2018, 11:23 PM
i do that in most cases. but this is a case where i want any failure of os.listdir() to be handled. so, i guess, your suggestion means i need to research os.listdir() to find out what all it could raise and list them all on the except.
my real concern is nesting of exception handling, and a 2nd exception being raised (of exactly the same type of exception) before the 1st one completes being handled. could it fall back to the previously defined handler or could it handled as a "during" case? how would a "during" case actually be handled in this kind of situation with regard to running code to handle it? i want to be sure that N exceptions result in the handler code running not only N times, but in the correct order. it seems that by default, an internal try trap in effect during except handling (for it to see the cases of another exception during the handling of one).
my real concern is nesting of exception handling, and a 2nd exception being raised (of exactly the same type of exception) before the 1st one completes being handled. could it fall back to the previously defined handler or could it handled as a "during" case? how would a "during" case actually be handled in this kind of situation with regard to running code to handle it? i want to be sure that N exceptions result in the handler code running not only N times, but in the correct order. it seems that by default, an internal try trap in effect during except handling (for it to see the cases of another exception during the handling of one).
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.