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

Use of stderr #14

Closed
hadley opened this issue Feb 5, 2015 · 3 comments
Closed

Use of stderr #14

hadley opened this issue Feb 5, 2015 · 3 comments

Comments

@hadley
Copy link
Contributor

hadley commented Feb 5, 2015

R CMD check complains:

* checking compiled code ... NOTE
File ‘haven/libs/haven.so’:
  Found ‘___stderrp’, possibly from ‘stderr’ (C)
    Objects: ‘readstat_por.o’, ‘readstat_por_parse.o’,
      ‘readstat_sas.o’, ‘readstat_sav.o’, ‘readstat_sav_parse.o’

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor the C RNG.

this isn't a huge problem, but it would be nice if there was some alternative way to capture error messages, rather than sending them to stderr.

@evanmiller
Copy link
Contributor

Maybe we can add an error/warning handler callback?

@hadley
Copy link
Contributor Author

hadley commented Feb 5, 2015

That seems like a reasonable approach to me - if NULL, it could just use STDERR

@evanmiller
Copy link
Contributor

There's now an error handler API in the new design:

https://github.com/WizardMac/ReadStat/blob/master/src/readstat.h#L83

By default nothing happens. It would be nice to print to stderr by default in a way that doesn't trigger the R CMD warning.

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

No branches or pull requests

2 participants