• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to check if super exists if it doesn't without throwing an exception?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to check if super exists if it doesn't without throwing an exception?


  • Subject: How to check if super exists if it doesn't without throwing an exception?
  • From: Alex Zavatone <email@hidden>
  • Date: Thu, 18 Jun 2015 16:06:55 -0400

I've got some spooky code that I'm digging into that calls an instance method in an uninstantiated timer class within main.m's main to start an application timer detecting touches to keep the app alive.

Within this pearl, we have [super sendevent:event]; within an @try block.

At the point of the exception, super isn't even accessible, declared or defined.

The @catch after it doesn't even catch the exception.  The exception is thrown right away.

If I even check to see if super is nil, an exception is immediately thrown.

How would I check for the existence of super to prevent this?

Thanks in advance.

Alex Zavatone



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: How to check if super exists if it doesn't without throwing an exception?
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: recycleURLs with authorization
  • Next by Date: Re: How to check if super exists if it doesn't without throwing an exception?
  • Previous by thread: Re: Action Menu
  • Next by thread: Re: How to check if super exists if it doesn't without throwing an exception?
  • Index(es):
    • Date
    • Thread