Share via


ServerAPIException Class

Represents exceptions that are thrown during various MapPoint Location Server operations under unusual or unexpected circumstances, such as network failures, sudden unavailability of the MapPoint Location Server database, and so on.

Microsoft.MapPoint.LocationServer.Management

Public Class ServerAPIException Inherits Microsoft.MapPoint.MapPointException
    Member of Microsoft.MapPoint.LocationServer.Management
[C#]
public class ServerAPIException : Microsoft.MapPoint.MapPointException
    Member of Microsoft.MapPoint.LocationServer.Management

Remarks

In the context of MapPoint Location Server, this exception type is also called the unknown exception type. When you catch this type of exception in your code, check the InnerException property for additional details about the exception.

Example

 
[Visual Basic]
    Try
        'Some ServerAPI method call.
    Catch MyException As Microsoft.MapPoint.LocationServer.Management.ServerAPIException
        If Not (MyException.InnerException Is Nothing) Then
            Dim message As String = MyException.InnerException.Message
            'Perform your own exception handling here.
        End If
    End Try


 
[C#]
  try
  {
  //Some ServerAPI method call.
  }
  catch(Microsoft.MapPoint.LocationServer.Management.ServerAPIException MyException)
  {
   if(MyException.InnerException != null)
   {
    string message = MyException.InnerException.Message;
    //Perform your own exception handling here.
   }
  }