- wxASSERT_MSG( classInfo , wxString::Format(wxT("unknown class %s"),className ) ) ;
- wxASSERT_MSG( !children || children->GetType() != wxXML_TEXT_NODE , wxT("objects cannot have XML Text Nodes") ) ;
+ if ( classInfo == NULL )
+ {
+ wxLogError( wxString::Format(_("unknown class %s"),className ) ) ;
+ return wxInvalidObjectID ;
+ }
+
+ if ( children != NULL && children->GetType() == wxXML_TEXT_NODE )
+ {
+ wxLogError(_("objects cannot have XML Text Nodes") ) ;
+ return wxInvalidObjectID;
+ }