[mapguide-internals] Exceptions...

Jason Birch Jason.Birch at nanaimo.ca
Tue Apr 10 21:49:23 EDT 2007


Thanks Steve,
 
I really should have been more specific.  I didn't say PHP anywhere.
 
I was expecting this to throw an exception (not exactly a good polygon):
 
<?php 
try 
{ 
  $wktReaderWriter = new MgWktReaderWriter(); 
  $poly = $wktReaderWriter->Read("POLYGON ( ( 1 1 , 2 1 , 1 2 , 1 11 ) )"); 
  print $poly->GetArea();
} 
catch (Exception $ex) 
{ 
   print "Exception";
   exit; 
} 
?> 
 
But it only did when I explicitly tried to catch an MgException rather than a standard PHP Exception.
 
Jason

________________________________

From: Steve Dang
Subject: RE: [mapguide-internals] Exceptions...

Hi Jason,

MG tries to catch all third-party exceptions and standard exceptions, then converts them to MgException.

It's a defect if there is an uncaught exception. How does this happen? On Linux?

Thanks,
Steve.


More information about the mapguide-internals mailing list