On 28.11.2009, at 13:57, Gwynne Raskind wrote:
> On Nov 28, 2009, at 4:25 AM, Greg Parker wrote:
>> Here's a fun idiom for handling both C++ and Objective-C exceptions in the
>> same place (on iPhone and 64-bit Mac).
>>
>> @try {
>> // do stuff
>> } @catch (NSException *e) {
>>
On Fri, Nov 27, 2009 at 2:40 PM, Mark Allan wrote:
>
> On 27 Nov 2009, at 1:10 am, Dave Keck wrote:
>>>
>>> Exception Type: EXC_BAD_ACCESS (SIGBUS)
>>
>> After a cursory reading of your code it looks like you're dealing with
>> a threading issue involving myItemList or imminentList. Your comment
On Nov 28, 2009, at 4:25 AM, Greg Parker wrote:
> Here's a fun idiom for handling both C++ and Objective-C exceptions in the
> same place (on iPhone and 64-bit Mac).
>
>@try {
>// do stuff
>} @catch (NSException *e) {
>// NSException
>} @catch (id e) {
>// Othe
On Nov 27, 2009, at 1:14 AM, Matt Gough wrote:
The equivalent in Obj-c would be :
@try
{
...
}
@catch( NSException* e)
{
// deal with NSException
}
@catch(id ue)
{
// deal with any other sort of exception
}
There's also `...@catch (...)` in Objective-C.
On iPhone and 64-bit Mac, `...@catch (.
If one thread reads imminentList while another is modifying it, you can
crash. There are instants during the modification where it will be in an
internally inconsistent state.
--
Scott Ribe
scott_r...@killerbytes.com
http://www.killerbytes.com/
(303) 722-0567 voice
_
On 27 Nov 2009, at 11:40, Mark Allan wrote:
> Isn't it the case that you only need locks around something if you plan that
> it will be modified by more than one thread at a time, or if you write to it
> in another thread and care that any read operation will be predictable?
No, that is not the
On 27 Nov 2009, at 1:10 am, Dave Keck wrote:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
After a cursory reading of your code it looks like you're dealing with
a threading issue involving myItemList or imminentList. Your comment
mentions "We don't really care if imminentList changes because the
d
On 26 Nov 2009, at 23:51, Mark Allan wrote:
>
>
> Exception Type: EXC_BAD_ACCESS (SIGBUS)
> Exception Codes: KERN_PROTECTION_FAILURE at 0x0010
> Crashed Thread: 3
You can't catch that with an Objective C exception handler. It's a Unix bus
error. Probably some pointer has chang
On 27 Nov 2009, at 01:08:28, Graham Cox wrote:
> Does Objective C support multiple catch blocks, like C++? In other words you
> could do:
>
> @try
> {
> ...
> }
> @catch( NSException* e)
> {
> // deal with NSException
> }
> @catch(...)
> {
> // deal with any other sort of exception
> }
The e
> PS. Yes, I know there are faster and more efficient ways to enumerate an
> array, but the old-school 'for' loop approach still comes to mind first and
> I still prefer it for small arrays.
Overlooking the speed benefits, fast enumeration will also throw an
exception if the array you're enumerati
On 27/11/2009, at 10:51 AM, Mark Allan wrote:
> @catch (NSException *e) {
> NSLog(@"Splat! Reason: %@", [e reason]);
Maybe the exception isn't an NSException*, and therefore uncaught by this.
Does Objective C support multiple catch blocks, like C++? In other words you
coul
Hi folks,
I've got a section of code which crashes intermittently under 10.6 but
despite being enclosed in try/catch blocks, my app is still forced to
terminate. For what it's worth, all of the crash reports are from
10.6.x. My app seems to be rock solid when run under 10.4 and 10.5.
I
12 matches
Mail list logo