views:

39

answers:

1
+1  Q: 

OCUnit Error Codes

Does anyone know how to find a list of all the possible error codes thrown by the ostest utility, and their meanings? I noticed this to be a common problem for people, where they ask about an OCUnit failure with some code 138 or 139 that is completely opaque to them, and somebody who has encountered that particular error number points out an obvious problem which the asker could have easily identified if they knew what to look for.

But Google, ADC, and the man pages all seem to be silent about these error codes. I was hoping somebody had a list or a header file that outlined all of them. Not only would it help resolve my particular issue now (getting a mysterious 132), but I think it would be of general interest.

Thanks!

+1  A: 

OCUnit failures of 138 or 139 is just a generic something went wrong. In my experience, I found that these errors come up when something goes wrong during runtime. So, your code compiles fine, but when run in OCUnit, it crashes. Unfortunately, the slack trace is not revealing as to where this occurred.

I detailed some things to look for here. In sum:
1. Check your dealloc/alloc areas make sure that these objects really do exist/are being called correctly.
2. Check your spelling, typos, etc... (two variables similarly named, but wrongly used? casts?)
3. Try to isolate your tests, meaning, work through your tests to find out which one fails. OCUnit is crashing due to a problem with your code.
4. If all else fails let the code target the simulator instead of OCUnit, you should get more meaningful slack traces that way.

Chad