Decoding OSStatus values
Is there an easy way to decode the values from OSStatus. I have this #define that I copied from another project but it isnt really helping.. This gives me an error such as Error: \316\377\377\377 #define checkStatus( err) \ if(err) {\ printf(Error: %s - %s: %d\n, (char *)err,__FILE__, __LINE__);\ fflush(stdout);\ return err; \ } cheers RD ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Decoding OSStatus values
Le 15 oct. 08 à 16:49, Richard Dearlove a écrit : Is there an easy way to decode the values from OSStatus. I have this #define that I copied from another project but it isnt really helping.. This gives me an error such as Error: \316\377\377\377 #define checkStatus( err) \ if(err) {\ printf(Error: %s - %s: %d\n, (char *)err,__FILE__, __LINE__);\ fflush(stdout);\ return err; \ } cheers RD An OSStatus is not an OSType (FourCharCode). OSStatus can be any value and does not generaly contains readable characters. To get an idea about what an OSStatus represent, you can use thoses 2 functions (from CarbonCore): const char* GetMacOSStatusErrorString(OSStatus err); const char* GetMacOSStatusCommentString(OSStatus err); ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Decoding OSStatus values
Thanks! On 15 Oct 2008, at 16:01, Jean-Daniel Dupas wrote: Le 15 oct. 08 à 16:49, Richard Dearlove a écrit : Is there an easy way to decode the values from OSStatus. I have this #define that I copied from another project but it isnt really helping.. This gives me an error such as Error: \316\377\377\377 #define checkStatus( err) \ if(err) {\ printf(Error: %s - %s: %d\n, (char *)err,__FILE__, __LINE__);\ fflush(stdout);\ return err; \ } cheers RD An OSStatus is not an OSType (FourCharCode). OSStatus can be any value and does not generaly contains readable characters. To get an idea about what an OSStatus represent, you can use thoses 2 functions (from CarbonCore): const char* GetMacOSStatusErrorString(OSStatus err); const char* GetMacOSStatusCommentString(OSStatus err); ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Decoding OSStatus values
On Oct 15, 2008, at 7:49 AM, Richard Dearlove wrote: Is there an easy way to decode the values from OSStatus. I have this #define that I copied from another project but it isnt really helping.. This gives me an error such as Error: \316\377\377\377 #define checkStatus( err) \ if(err) {\ printf(Error: %s - %s: %d\n, (char *)err,__FILE__, __LINE__);\ fflush(stdout);\ return err; \ } cheers RD Also see this: open -h MacErrors.h -Peter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Decoding OSStatus values
On Oct 15, 2008, at 1:22 PM, Peter Ammon wrote: On Oct 15, 2008, at 7:49 AM, Richard Dearlove wrote: Is there an easy way to decode the values from OSStatus. I have this #define that I copied from another project but it isnt really helping.. This gives me an error such as Error: \316\377\377\377 #define checkStatus( err) \ if(err) {\ printf(Error: %s - %s: %d\n, (char *)err,__FILE__, __LINE__);\ fflush(stdout);\ return err; \ } cheers RD Also see this: open -h MacErrors.h As well as /usr/bin/macerror ('man macerror'). ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]