Monday, 16th July, 2007

Virtools (Mini-)Tip Of The Day: prefix console messages !

Filed under: Virtools, Virtools Tutorials, Tips and Tricks — dominique @ 12:29

You added a couple of BG/VSL BBs from your resource to your composition. Then you hit play …. and oops … a new console message is there, saying something like "input error!". 

Ok, maybe you forgot to attach a local parameter to one of the BBs … but where? To make a long story short, always prefix you error message with a context identifier. For example, you write a VSL BB that modifies a texture … it might happen that you, or somebody else using that BB, will forget to attach a parameter to it and dang your code creates an exception if you don't check it.

Example:

    if( NULL != sourceTexture  )
    {
       // my code here
     }
    else
    {
        bc.OutputToConsole("BB_NameHere: Input error! No source texture available");
    }

 

If you want to check for availability of objects using the schematic, you can use my VSL BB TestForNull

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • Digg
  • Reddit
  • Google Bookmarks
  • YahooMyWeb
  • Live-MSN
  • Facebook

No Comments »

No comments yet.

RSS feed for comments on this post. | TrackBack URI

Leave a comment

XHTML ( You can use these tags): <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • Digg
  • Reddit
  • Google Bookmarks
  • YahooMyWeb
  • Live-MSN
  • Facebook