9. Understanding .NET Data Provider Connectivity : .NET Data Provider Classes : IngresException Class
 
Share this page                  
IngresException Class
The IngresException class represents the exception that is thrown when error information is returned by the Ingres database.
IngresException Class Declaration
The IngresException is declared as follows:
C#: [Serializable]
public sealed class IngresException : SystemException
VB.NET: <Serializable>
NotInheritable Public Class IngresException
Inherits SystemException
IngresException Class Example
The following is an example implementation of the IngresException class:
static void PrintException(IngresException ex)
{
    Console.Write(ex.GetType().ToString() + ":\n");
    Console.Write("\t" + "Errors = " +
        (ex.Errors !=null?ex.Errors.ToString() :
            "<null>") + "\n");
    Console.Write("\t" + "HelpLink = " +
        (ex.HelpLink !=null?ex.HelpLink.ToString() :
            "<null>") + "\n");
    Console.Write("\t" + "InnerException = " +
                (ex.InnerException!=null?ex.InnerException.ToString():
            "<null>") + "\n");
    Console.Write("\t" + "Source = " +
        (ex.Source !=null?ex.Source.ToString() :
            "<null>") + "\n");
    Console.Write("\t" + "TargetSite = " +
                (ex.TargetSite!=null?ex.TargetSite.ToString():"<null>") + "\n");
    Console.WriteLine("");
}
IngresException Class Properties
The IngresException class contains the following properties:
Property
Accessor
Description
Errors
get
An ErrorCollection of one or more Error objects that give more detailed information on the exception generated by the provider.
InnerException
get
The nested Exception instance that caused the current exception. Inherited from Exception.
Message
get
A concatenation of all the messages in the Errors collection.
Source
get
Name of the data provider that generated the error. Always “Ingres.”
StackTrace
get
A string representation of the frames on the call stack at the time the current exception was thrown.
TargetSite
get
The method that threw the current exception. Inherited from Exception.
IngresException Class Public Methods
The public methods available to the IngresException class are:
Method
Description
ToString
The description of the exception as a string.