I'd hardly call an if statement 'coding jiggery-pokery', seems like best practice to me.
On 20 January 2014 12:05, Jon Swindells <[email protected]> wrote: > code looks clean to me. > > if you don't like the error output from commands then don't use them > > the time spent finding and coding jiggery-pokery is much better spent > developing an OM parenting function. replete with your own error messages > :) > > > > > > -- > Jon Swindells > [email protected] > > > > On Mon, Jan 20, 2014, at 11:25 AM, Eugen Sares wrote: > > Hi, > for the sake of cleanness in my code - is there a way to hide the error > message that shows when trying to parent an object to something that it is > already child of? > Can't get that try catch trick to work. > Thanks! > Eugen > > > var oObj= CreatePrim("Cube", "MeshSurface", null, null); > var oParent = ActiveSceneRoot; > //ParentObj(oParent, oObj); // WARNING : 3030-EDIT-ParentObj - Command was > cancelled. > try > { > ParentObj(oParent, oObj); > } > catch(e) > { > //LogMessage(e); > } > > > > > ------------------------------ > > <http://www.avast.com/> > > Diese E-Mail ist frei von Viren und Malware, denn der avast! > Antivirus<http://www.avast.com/>Schutz ist aktiv. > > > >

