Class ESSPIError

Unit

Declaration

type ESSPIError = class(Exception)

Description

Specific exception class. Could be created on WinAPI error, SChannel error or general internal error.

Hierarchy

Overview

Fields

Public WinAPIErr: DWORD;
Public SecStatus: SECURITY_STATUS;

Methods

Public constructor CreateWinAPI(const Action, Func: string; Err: DWORD);
Public constructor CreateSecStatus(const Action, Func: string; Status: SECURITY_STATUS; const Info: string = ''); overload;

Description

Fields

Public WinAPIErr: DWORD;

If not zero, reason of exception is WinAPI and this field contains code of an error returned by GetLastError

Public SecStatus: SECURITY_STATUS;

If not zero, reason of exception is SChannel and this field contains security status returned by last function call

Methods

Public constructor CreateWinAPI(const Action, Func: string; Err: DWORD);

Create WinAPI exception based on Err code

Parameters
Action
- current action, like sending data or @ Init
Func
- WinAPI method, like Send
Err
- error code
Public constructor CreateSecStatus(const Action, Func: string; Status: SECURITY_STATUS; const Info: string = ''); overload;

Create SChannel exception based on status and, optionally, on custom info message If empty, info message is generated based on Status

Parameters
Action
- current action, like @ CreateCredentials
Func
- SChannel method, like AcquireCredentialsHandle
Status
- SChannel status that will be copied to SecStatus field.
Info
- custom info message that will be inserted in exception message.

Generated by PasDoc 0.16.0.