• zorglub's avatar
    Add facilities to report and enrich error messages. · 65d21833
    zorglub authored
    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.
    
    65d21833
input.c 84.7 KB