Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xar_register_errhandler's usrctx gets set to NULL when a new error is raised #83

Open
GoogleCodeExporter opened this issue Feb 29, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Register an error handler using xar_register_errhandler(x, callback, 
some_custom_context)
2. xar_extract_tofile to a folder that is read only
3. the registered callback gets called with the error

What is the expected output? What do you see instead?
I'd expect the "some_custom_context" to be passed as the err_handler's usrctx 
parameter, but I keep getting nil. 

What version of the product are you using? On what operating system?
OS X Lion + XAR 1.5.2 from the Download's tarball. 

Please provide any additional information below.

The issue happens because the usrctx is stored within the errctx struct and 
when an error is reported xar_err_new is called which memsets errctx thus 
removing the context. I would have expected the usrctx to be stored in the same 
struct as the callback which would fix this issue.

I need this so that the error handler will call my ObjC wrapper. 

Original issue reported on code.google.com by [email protected] on 5 Mar 2012 at 8:43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant