Exceptions: Difference between revisions

Jump to navigation Jump to search
304 bytes added ,  20 December 2007
note about assertions.
(edit & wikify s3)
(note about assertions.)
Line 126: Line 126:
    
    
This is the style recommended by C++ authorities. The problem here is that the code is no longer equivalent to the original nsresult code: the fixup is run on success as well as failure. We still might be able to produce this rewriting automatically, but we need to know more about how the fixups appear in our code and how they can be identified.
This is the style recommended by C++ authorities. The problem here is that the code is no longer equivalent to the original nsresult code: the fixup is run on success as well as failure. We still might be able to produce this rewriting automatically, but we need to know more about how the fixups appear in our code and how they can be identified.
Besides fixups, the current nsresult code often logs errors or runs assertions. With exception stack traces, logging should be less important, but assertions are a real issue. We need to decide out how the assertion sites should behave with exceptions and then figure out how to implement that in C++.


The second problem is that the if condition is often a little more complicated than what our pattern allows. We also have:
The second problem is that the if condition is often a little more complicated than what our pattern allows. We also have:
313

edits

Navigation menu