|
From: | Axel |
Subject: | Re: [avrdude-dev] Replacing exit() in library functions |
Date: | Fri, 16 May 2014 21:53:02 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
Am 16.05.2014 21:23, schrieb Georg von Zengen:
an AVRDUDE library would be nice I think. But a library should never call exit(), in my opinion. It makes debugging more complicated than necessary. And even if it is not possible to proceed the decision what to do should be left to the application developer.
I would agree with Georg. How about a function like avrdude_fatal_error(int code, char * diag). It could be implemented in main.c with e.g. an exit(). Library users canimplement it according to their needs. (E.g. drawing an exception in Python).
Best, Axel
[Prev in Thread] | Current Thread | [Next in Thread] |