Current Forum: 15-211 Main Forum |
Date: Mon Oct 22 2001 3:07 pm |
Author: Chen, Richard <richardc@andrew.cmu.edu> |
Subject: try catch scope size |
|
|
Must the catch of a try{}catch(Exception e){} be placed immediately after the call to a *Bit* (reader, writer, whatever) method? In my experience (little as it is), the compiler complains when the catch is placed too far from the call to the *Bit* method.
At an extreme example, having the whole method compress() (or decompress()) with obly 1 try and catch (assuming it had just 1 call to a *Bit* method) make the compiler complain.
I can give sample code if need be. |
|