[vlc-devel] vlc: svn commit r18442 (zorglub)

Subversion daemon svn at videolan.org
Fri Dec 22 22:14:12 CET 2006

r18442 | zorglub | 2006-12-22 22:14:11 +0100 (Fri, 22 Dec 2006) | 23 lines
Changed paths:
   M /trunk/include/vlc_common.h
   M /trunk/include/vlc_messages.h
   M /trunk/include/vlc_threads.h
   M /trunk/include/vlc_threads_funcs.h
   M /trunk/src/input/access.c
   M /trunk/src/input/input.c
   M /trunk/src/misc/messages.c
   M /trunk/src/misc/modules.c
   M /trunk/src/misc/threads.c

Add facilities to report and enrich error messages. 

The idea is that a given error should be reported only once to the user.
At the moment, for example, we can get:
- "no suitable access module" (printed by module_Need)
 - "unable to create access" (printed by input/access)
 - "unable to open stream" (printed by input/input)
 - ...

The facilities provided here are:
* msg_StackSet( code, message ) : "throw" a new error
* msg_StackAdd( message ) : Append a message allowing to trace the message
* msg_StackMsg() : Retrieve the message

So, in the previous example, module_Need would msg_StackSet( code, "no
suitable access module"), then input/input would add "unable to create
access" and finally, input/input can print the "unable to open stream:
unable to create access: no suitable module" message.

The three functions are context-free, you don't need a vlc_object, so
that we can add verbose error reporting everywhere.

 > http://trac.videolan.org/vlc/changeset/18442

This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list