[gme-users] probklems with findByID (BON2)

Berthing Jesper f35594 at Danfoss.com
Mon Oct 23 21:08:10 CDT 2006


Hi,

I have a problem with the function findByID that throws an exception on line 50 in bonimpl.cpp.

Currently I am using the function in order to check the current model against a backup model (XML) where I have the ID’s stored of each object. If the object is present in the current model it functions correctly, but if it is not present the exception is thrown. 

Therefore, how should I use the function?

Example:
try
{
  if(0 == project->findByID(“Id not present in the model”, true))
  {
	// Object with id not present
  }
  else
  {
	// Object with id present.
  }
}
catch(BON::Exception& e)
{
	//print error
}

Best regards,
Jesper 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20061023/25a5cc7f/attachment.htm


More information about the gme-users mailing list