• 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
Re: NSAssert Error output contains source code path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAssert Error output contains source code path


  • Subject: Re: NSAssert Error output contains source code path
  • From: "Sean McBride" <email@hidden>
  • Date: Sat, 10 Mar 2007 01:18:09 -0500

email@hidden (email@hidden) on 2007-03-09 16:14 said:

>> I just had something odd happen... A user of the software project I
>> inherited ran into a program error. There's an NSAssert in the code
>> whose result is output to console. The error shows the path of the
>> class when it was compiled:
>>
>> *** Assertion failure in -[blahblah resizeImages], /Users/jaimelm/
>> project/blablah.mm:1593
>
>The NSLog() or whatever is printing __FILE__, which hardcodes the path of
>the sourcecode into a string.  That's a common debugging technique.  There
>is also __LINE__, as shown in the 1593.

And with CodeWarrior __FILE__ gives blablah.mm.  With Xcode/gcc (by
default anyway, as Jaime discovered) it gives the full path.  The list
archives have discussions on this.

Sean

--
1908's Model T Ford: 25 miles per gallon.  Today's Ford Expedition: 15.5 mpg.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

References: 
 >NSAssert Error output contains source code path (From: Jaime Magiera <email@hidden>)
 >Re: NSAssert Error output contains source code path (From: email@hidden)

  • Prev by Date: Re: Easy question about URLs
  • Next by Date: Re: NSURL Containing RTSP and Password?
  • Previous by thread: Re: NSAssert Error output contains source code path
  • Next by thread: Re: NSAssert Error output contains source code path
  • Index(es):
    • Date
    • Thread