Professional Web Applications Themes

Trapping assertion failures in gdb/Cocoa? - Mac Programming

Hey Just wondering, does anybody know how to trap an assertion failure in gdb? Docu says it rasies an NSInternalInconsistencyException, so I thought it would be possible to trap the signal in gdb? But I haven't been able to figure out what signal this is (UNIX name, or the name that gdb uses). I see it may be possible to create a subclass of NSAssertionHandler, and make it the default assertion handler for the thread, but I thought it sounded a bit inconvenient to have to do that every time I might need it. Per...

  1. #1

    Default Trapping assertion failures in gdb/Cocoa?

    Hey

    Just wondering, does anybody know how to trap an assertion failure in
    gdb?

    Docu says it rasies an NSInternalInconsistencyException, so I thought it
    would be possible to trap the signal in gdb? But I haven't been able to
    figure out what signal this is (UNIX name, or the name that gdb uses).

    I see it may be possible to create a subclass of NSAssertionHandler, and
    make it the default assertion handler for the thread, but I thought it
    sounded a bit inconvenient to have to do that every time I might need
    it.

    Per
    Per Guest

  2. #2

    Default Re: Trapping assertion failures in gdb/Cocoa?

    In article <1g2trx0.8h529u4j5u8N%com>,
    com (Per Bull Holmen) wrote:
     

    If it raises an exception, then you should use an exception handler to
    catch the exception. See the doentation for Nception to see how to
    do that.
    Michael Guest

  3. #3

    Default Re: Trapping assertion failures in gdb/Cocoa?

    In article <1g2trx0.8h529u4j5u8N%com>,
    com (Per Bull Holmen) wrote:
     

    Break on -[Nception raise].

    Hope this helps,
    Eric

    --
    Eric Albert edu
    http://rescomp.stanford.edu/~ejalbert/
    Eric Guest

  4. #4

    Default Re: Trapping assertion failures in gdb/Cocoa?

    Eric Albert <edu> wrote:
     
    >
    > Break on -[Nception raise].[/ref]

    THAT simple.... :)

    Thanks, I'll try it next time.... :)

    Per
    Per Guest

Similar Threads

  1. trapping in PDF ?
    By philip_francis@adobeforums.com in forum Adobe Indesign Macintosh
    Replies: 2
    Last Post: July 20th, 09:54 AM
  2. DIG assertion
    By RR in forum Windows Networking
    Replies: 0
    Last Post: July 15th, 05:52 PM
  3. dblib Assertion
    By Erland Sommarskog in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: July 8th, 10:40 PM
  4. Assertion Error- Save to Web
    By S. Baldwin in forum Adobe Photoshop Elements
    Replies: 2
    Last Post: July 7th, 08:41 PM
  5. Assertion failure when saving for web
    By leoDaw in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 3
    Last Post: July 6th, 01:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139