# MTSessionError

An object holding all details about a session that failed in the pipeline.

## Program ID

MetraPipeline.MTSessionError.1

## MTPipeline Properties

ErrorCode | Returns the error code.
ErrorCode | Sets the error code.
ErrorMessage | Returns the error message for the error that caused this session to fail.
ErrorMessage | Sets the error message.
FailureTime | Returns the time the session failed.
IPAddress | Returns the IP address of the machine that metered the failed session.
LineNumber | Returns the line number of this error.
LineNumber | Sets the line number of this error.
MeteredTime | Returns the time the session was metered.
ModuleName | Returns the name of the module where the session failed.
ModuleName | Sets the name of the module where the session failed.
PlugInName | Returns the name of the plug-in where the session failed.
PlugInName | Sets the name of the plug-in where the session failed.
ProcedureName | Returns the name of the procedure where the session failed.
ProcedureName | Sets the name of the procedure where the session failed.
RootSessionID | Returns the ID of the root of the session if a compound session. Otherwise, returns the session ID of the failed session.
RootSessionID | Sets the ID of the root of the session if a compound session. Otherwise, sets the session ID of the failed session.
Session | Retrieves a parsed version of the session. This is a read-only property.
SessionID | Returns the session ID, base64 encoded.
SessionID | Sets the session ID, base64 encoded.
StageName | Returns the name of the stage where the session failed.
StageName | Sets the name of the stage where the session failed.
XMLMessage | Returns the XML representation of the failed session.
XMLMessage | Sets the XML representation of the failed session.

## Example

Example to be provided in a future release of this online help system.

# Property Detail

## LineNumber

Returns the line number of this error.

### Visual Basic Syntax

Property LineNumber As Long

### C++ Syntax

HRESULT LineNumber([out, retval] int *pVal);

### Return Value

Line number

## LineNumber

Sets the line number of this error.

### Visual Basic Syntax

Property LineNumber(newVal As Long)

### C++ Syntax

HRESULT LineNumber([in] int newVal);

### Arguments

newVal

The new line number

## ErrorCode

Returns the error code.

### Visual Basic Syntax

Property ErrorCode As <Unsupported variant type>

### C++ Syntax

HRESULT ErrorCode([out, retval] DWORD *pVal);

### Return Value

The error code.

## ErrorCode

Sets the error code.

### Visual Basic Syntax

Property ErrorCode (newVal As <Unsupported variant type>)

### C++ Syntax

HRESULT ErrorCode([in] DWORD newVal);

### Arguments

newVal

error code

## SessionID

Returns the session ID, base64 encoded. The ID returned is the ID of the session within a compound that failed.

### Visual Basic Syntax

Property sessionID As String

### C++ Syntax

HRESULT SessionID([out, retval] BSTR *pVal);

### Return Value

The session ID

## SessionID

Sets the session ID, base64 encoded. The ID set is the ID of the session within a compound that failed.

### Visual Basic Syntax

Property sessionID (newVal As String)

### C++ Syntax

HRESULT SessionID([in] BSTR newVal);

### Arguments

newVal

new session ID

## ErrorMessage

Returns the error message for the error that caused this session to fail. This is not the translation of the error code. This error message provides additional error information.

### Visual Basic Syntax

Property ErrorMessage As String

### C++ Syntax

HRESULT ErrorMessage([out, retval] BSTR *pVal);

### Return Value

The error message

## ErrorMessage

Sets the error message. This is not the translation of the error code. This error message provides additional error information.

### Visual Basic Syntax

Property ErrorMessage (newVal As String)

### C++ Syntax

HRESULT ErrorMessage([in] BSTR newVal);

### Arguments

newVal

error message

## StageName

Returns the name of the stage where the session failed.

### Visual Basic Syntax

Property StageName As String

### C++ Syntax

HRESULT StageName([out, retval] BSTR *pVal);

### Return Value

The stage name

## StageName

Sets the name of the stage where the session failed.

### Visual Basic Syntax

Property StageName (newVal As String)

### C++ Syntax

HRESULT StageName([in] BSTR newVal);

### Arguments

newVal

Stage name

## PlugInName

Returns the name of the plug-in where the session failed.

### Visual Basic Syntax

Property PlugInName As String

### C++ Syntax

HRESULT PlugInName([out, retval] BSTR *pVal);

### Return value

The plug-in name

## PlugInName

Sets the name of the plug-in where the session failed.

### Visual Basic Syntax

Property PlugInName (newVal As String)

### C++ Syntax

HRESULT PlugInName([in] BSTR newVal);

### Arguments

newVal

plug-in name

## ModuleName

Returns the name of the module where the session failed. The module is usually the filename of the source file where the error was generated.

### Visual Basic Syntax

Property ModuleName As String

### C++ Syntax

HRESULT ModuleName([out, retval] BSTR *pVal);

### Return Value

The module name

## ModuleName

Sets the name of the module where the session failed. The module is usually the filename of the source file where the error was generated.

### Visual Basic Syntax

Property ModuleName (newVal As String)

### C++ Syntax

HRESULT ModuleName([in] BSTR newVal);

### Arguments

newVal

module name

## ProcedureName

Returns the name of the procedure where the session failed.

### Visual Basic Syntax

Property ProcedureName As String

### C++ Syntax

HRESULT ProcedureName([out, retval] BSTR *pVal);

### Return Value

The procedure name

## ProcedureName

Sets the name of the procedure where the session failed.

### Visual Basic Syntax

Property ProcedureName (newVal As String)

### C++ Syntax

HRESULT ProcedureName([in] BSTR newVal);

### Arguments

newVal

procedure name

## IPAddress

Returns the IP address of the machine that metered the failed session.

This is a read-only property.

### Visual Basic Syntax

Property IPAddress As String

### C++ Syntax

HRESULT IPAddress([out, retval] BSTR *pVal);

### Return Value

The IP address

## FailureTime

Returns the time the session failed.

This is a read-only property.

### Visual Basic Syntax

Property FailureTime As Date

### C++ Syntax

HRESULT FailureTime([out, retval] DATE *pVal);

### Return Value

The failure date/time

## MeteredTime

Returns the time the session was metered.

This is a read-only property.

### Visual Basic Syntax

Property MeteredTime As Date

### C++ Syntax

HRESULT MeteredTime([out, retval] DATE *pVal);

### Return Value

The metered time

## RootSessionID

Returns the ID of the root of the session if a compound session. Otherwise, returns the session ID of the failed session.

### Visual Basic Syntax

Property RootSessionID As String

### C++ Syntax

HRESULT RootSessionID([out, retval] BSTR *pVal);

### Return Value

The root session ID

## RootSessionID

Sets the ID of the root of the session if a compound session. Otherwise, sets the session ID of the failed session.

### Visual Basic Syntax

Property RootSessionID (newVal As String)

### C++ Syntax

HRESULT RootSessionID([in] BSTR newVal);

### Arguments

newVal

new session ID

## Session

Retrieves a parsed version of the session.

This property returns the equivalent of the ExamineMeteredSession method (which has been deleted from the MTPipeline object). MTPipeline still has a method called ExamineSession which returns an MTSession object given its XML representation.

### Visual Basic Syntax

Property Session As IMTSession

### C++ Syntax

HRESULT Session([out, retval] IMTSession * * session);

### Return Value

The parsed version of the message returned in XMLMessage

## XMLMessage

Returns the XML representation of the failed session.

### Visual Basic Syntax

Property XMLMessage As String

### C++ Syntax

HRESULT XMLMessage([out, retval] BSTR *pVal);

### Return Value

XML/MSIX representation of the session that failed. If the session is part of a compound, all parts of the compound are returned.

## XMLMessage

Sets the XML representation of the failed session.

### Visual Basic Syntax

Property XMLMessage (newVal As String)

### C++ Syntax

HRESULT XMLMessage([in] BSTR newVal);

### Arguments

newVal

message