• Post Reply Bookmark Topic Watch Topic
  • New Topic

Local Inner Class: Quick Question.  RSS feed

 
Mark O' Sullivan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Just wondering if one creates a local inner class, i.e. a class within a method and this class throws an exception, does the function have the capacity to catch this exception?
Thanks.
 
Leandro Coutinho
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark O' Sullivan wrote:Hi,
Just wondering if one creates a local inner class, i.e. a class within a method and this class throws an exception, does the function have the capacity to catch this exception?
Thanks.

Did you tried it?
Try and let us know.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Besides just trying it (which seems like it'd be quicker than waiting for an answer), what about exception handling semantics leads you to believe it might *not* be possible?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!