In Bentley Map, is there any way to trap and log all Posting Errors (Database Errors) rather than just displaying to the user as a table?

In Bentley Map V8i, is there any way to trap and log all Posting Errors (Database Errors) rather than just displaying to the user as a table?  What happens is users get these errors, and to log a ticket, they have to right click on the Posting Error, "Copy Selected Error" that paste into a ticket.  This rarely happens, and so our users get errors which go unreported.  If there was a way to configure \ setup Bentley Map to capture these errors in a central place.  If there is no way (i.e. a magic configuration variable) then perhaps if there was a way to trap the posting error in the code and manage it ourselves would also be good.

We are aware of the methods of adding in tracing in Oracle to capture the queries.

Thanks,Mike

Parents
  • In addition to Jeff's suggestion, you could build a small app using the Map SDK that captures errors to an XML file.  Attached is an Map CONNECT SDK example that illustrates how to do that.  The end result is an XML file as follows:

    <?xml version="1.0" encoding="utf-16"?>
    <Errors>
      <Error>
        <POINTS instanceID="1”>
          <ID>1</ID>
          <PROP_01>ERR</PROP_01>
          <PROP_02 />
          <GEOMETRY>
            <X>247409.089142292</X>
            <Y>5184761.06303017</Y>
            <Z>0</Z>
            <XScale>1</XScale>
            <YScale>1</YScale>
            <ZScale>0</ZScale>
            <Rotation>3.1415926535897931</Rotation>
          </GEOMETRY>
        </POINTS>
        <Exception Message="Error Updating Feature (class: POINTS, id: 1)">
          <StackTrace><![CDATA[   at Bentley.EngineeringContent.StorageTranslation.StorageTranslator.WorkingToPermanent(Boolean resynchWorkingStorage, IECCriteria criteria)]]></StackTrace>
          <Exception Message="UpdateRow: 
    ORA-02290: check constraint (TESTING_ONLY) violated
    
    ">
            <StackTrace><![CDATA[   at Bentley.EngineeringContent.Storage.Oracle.ECOracleRelationalStorageSession.UpdateRow(IECDataRow updatedRow, IECRowSelectionData rowSelectionData, Boolean useCompositeSurfaceForMultipolygon)
       at Bentley.EngineeringContent.Storage.ObjectToRelationalStorage.ECObjectToRelationalStorage.DoSequencedUpdateObject(IECInstance updatedObject)]]></StackTrace>
          </Exception>
        </Exception>
      </Error>
    </Errors>
    

    GDIPostingErrorCapture.zip

    With thanks to colleagues for providing this sample.

Reply
  • In addition to Jeff's suggestion, you could build a small app using the Map SDK that captures errors to an XML file.  Attached is an Map CONNECT SDK example that illustrates how to do that.  The end result is an XML file as follows:

    <?xml version="1.0" encoding="utf-16"?>
    <Errors>
      <Error>
        <POINTS instanceID="1”>
          <ID>1</ID>
          <PROP_01>ERR</PROP_01>
          <PROP_02 />
          <GEOMETRY>
            <X>247409.089142292</X>
            <Y>5184761.06303017</Y>
            <Z>0</Z>
            <XScale>1</XScale>
            <YScale>1</YScale>
            <ZScale>0</ZScale>
            <Rotation>3.1415926535897931</Rotation>
          </GEOMETRY>
        </POINTS>
        <Exception Message="Error Updating Feature (class: POINTS, id: 1)">
          <StackTrace><![CDATA[   at Bentley.EngineeringContent.StorageTranslation.StorageTranslator.WorkingToPermanent(Boolean resynchWorkingStorage, IECCriteria criteria)]]></StackTrace>
          <Exception Message="UpdateRow: 
    ORA-02290: check constraint (TESTING_ONLY) violated
    
    ">
            <StackTrace><![CDATA[   at Bentley.EngineeringContent.Storage.Oracle.ECOracleRelationalStorageSession.UpdateRow(IECDataRow updatedRow, IECRowSelectionData rowSelectionData, Boolean useCompositeSurfaceForMultipolygon)
       at Bentley.EngineeringContent.Storage.ObjectToRelationalStorage.ECObjectToRelationalStorage.DoSequencedUpdateObject(IECInstance updatedObject)]]></StackTrace>
          </Exception>
        </Exception>
      </Error>
    </Errors>
    

    GDIPostingErrorCapture.zip

    With thanks to colleagues for providing this sample.

Children
No Data