#1 Quiet Mode for COLLADA DOM

closed
Herbert Law
Conformance (1)
5
2007-05-10
2006-06-02
Robert Vinluan
No

Is it possible to have a quiet mode for the COLLADA DOM?

Right now, when I use the DOM to parse files, it will
spit out warnings and error messages to the console.

For example, if I try loading a file that doesn't
exist, I get a "no libxml2 reader" error message. Or
sometimes when I load malformed COLLADA files, I get
"The DOM was unable to create an attribute..." warning
messages.

It would be nice if I could easily disable these
messages. Even if all the printf's were wrapped up in
#ifdef _DEBUG and #endif directives, then at least that
way I could control whether I want the messages to
appear simply by defining or undefining the _DEBUG macro.

Thanks!

Discussion

  • Andy Lorino
    Andy Lorino
    2006-06-08

    Logged In: YES
    user_id=1434587

    Write your own daeErrorHandler that doesn't spit out any
    info. That won't completely quiet the DOM since not
    everything outputs through the errorHandler but I'm working
    on that. Its just a systematic change that we have been
    working on.

     
  • Marcus Barnes
    Marcus Barnes
    2007-04-17

    • assigned_to: nobody --> sceahklaw
     
  • Marcus Barnes
    Marcus Barnes
    2007-04-17

    • labels: --> Conformance
     
  • Marcus Barnes
    Marcus Barnes
    2007-04-17

    Logged In: YES
    user_id=1192578
    Originator: NO

    Completing this change may be needed for CTF integration.

     
  • Herbert Law
    Herbert Law
    2007-05-10

    • status: open --> closed
     
  • Herbert Law
    Herbert Law
    2007-05-10

    Logged In: YES
    user_id=1603796
    Originator: NO

    // thanks for the contribution from Brandon Ehle - azverkan
    #ifdef QUIET_MODE
    class YourOwnDaeErrorHandler : public daeErrorHandler
    {
    public:
    YourOwnDaeErrorHandler ()
    {
    setErrorHandler(this);
    }

    void handleError(daeString msg)
    {
    // CrtPrint( "Error: %s\n", msg );
    }

    void handleWarning(daeString msg)
    {
    // CrtPrint( "Warning: %s\n", msg );
    }
    } gErrorHandler;
    #endif

    add these code to your project to get ride of the warnings and errors.
    If it doesn't get rid of all the errors, please let me know.

    Thanks,

     
  • Herbert Law
    Herbert Law
    2007-05-10

    Logged In: YES
    user_id=1603796
    Originator: NO

    // thanks for the contribution from Brandon Ehle - azverkan
    #ifdef QUIET_MODE
    class YourOwnDaeErrorHandler : public daeErrorHandler
    {
    public:
    YourOwnDaeErrorHandler ()
    {
    setErrorHandler(this);
    }

    void handleError(daeString msg)
    {
    // CrtPrint( "Error: %s\n", msg );
    }

    void handleWarning(daeString msg)
    {
    // CrtPrint( "Warning: %s\n", msg );
    }
    } gErrorHandler;
    #endif

    add these code to your project to get ride of the warnings and errors.
    If it doesn't get rid of all the errors, please let me know.

    Thanks,