Error handling strategies in a shared library - C

前端 未结 4 1198
野的像风
野的像风 2021-02-14 10:40

I am writing a cross platform shared library (.so in linux and .dll in windows) using C. Currently when there is a error, library functions returns the

4条回答
  •  自闭症患者
    2021-02-14 11:08

    On linux, instead of printing the error on standard output (or standard error), you should log the error using rsyslog. Since you are dealing with GUI, maybe you can also pop a message box (not always).

    I have no idea about the windows, but I think it has something similar.

提交回复
热议问题