Current Forum: 15-211 Main Forum |
Date: Tue Oct 23 2001 7:10 am |
Author: Lin, Jeffrey T. <jtlin@ece.cmu.edu> |
Subject: Re: try catch scope size |
|
|
I have the entire compression in one try/catch block and it compiles fine. and i don't think there's a limit as in how "far" the catch has to be as long as all your methods that might throws an exception is caught in someway.
one thing that might be causing the trouble is that since try/catch means that some part of the codes might not get executed if an exception is raised, the compiler will complain if you try to return something (unless the function returns void, of course) in the try/catch block. |
|