On Jan 29, 2013, at 10:49 PM, rumbu <[email protected]> wrote: > I have one question regarding the Throwable, Error and Exception classes. > > I cannot understand why members like msg, file, line, info or next are not > hidden behind read-only properties or functions. What was the reason behind > making these fields public? As far as I know, once an exception is thrown, > there is no interest in modifying contained members.
I think the reason is mostly historic--the original exception classes had public members. There's no reason why they couldn't be hidden behind read-only properties though, other than the potential to break existing code.
