On 09/19/08 17:20, Petri Helin wrote: > VDR User wrote: >> I like that VDR won't load if a plugin failed. That means there was a >> problem, and I should go fix it. Also, it's the plugins job to >> continue on non-fatal errors, not VDR. How would VDR even know whats >> a non-fatal error for a certain plugin? From VDR's perspective either >> the plugin is working or it's not. >> > > But why should even a fatal error (from plugin's perspective) cause VDR > to not start? It should only cause the plugin not to be loaded. Of > course plugins could also implement more intelligent initialization and > try to deal with possible errors, but isn't it easier to just handle it > in one place - at the VDR? > > If I think of the core VDR, I see its main function as recording > TV-programmes. From that perspective it's not that big of a problem if > it doesn't start properly due to a plugin not bevahing properly if I am > sitting next to the PC and can fix or circumvent the problem. But since > it will mostly record when I am not sitting next to it, I would prefer > that it would still record the programme, no matter if all the plugins > failed.
And what if such a plugin implements a device? The definition of the Initialize() and Start() functions is: A return value of false indicates that something has gone wrong and the plugin will not be able to perform its task. In that case, the plugin should write a proper error message to the log file. The first plugin that returns false from its Initialize() or Start() function will cause VDR to exit. So, if a plugin thinks VDR can well run without it, it should just return true. If it's a plugin that's absolutely necessary for operation, it shall return false upon failure. VDR can't know that by itself. Klaus _______________________________________________ vdr mailing list firstname.lastname@example.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr