CryptoSys PKI  23.0.0
Static Public Member Functions | List of all members
dipki::Err Class Reference

Details of errors returned by the core library. More...

Static Public Member Functions

static std::string ErrorLookup (int errCode)
 Look up description for error code. More...
 
static std::string FormatErrorMessage (int errCode=0, const std::string &userMsg="")
 Return an error message string for the last error. More...
 
static std::string LastError ()
 Retrieve the last error message (if available). More...
 

Detailed Description

Details of errors returned by the core library.

Member Function Documentation

◆ ErrorLookup()

static std::string dipki::Err::ErrorLookup ( int  errCode)
static

Look up description for error code.

Parameters
errCodeCode number (may be positive or negative)
Returns
Corresponding error message.

◆ FormatErrorMessage()

static std::string dipki::Err::FormatErrorMessage ( int  errCode = 0,
const std::string &  userMsg = "" 
)
static

Return an error message string for the last error.

Parameters
errCodeError code returned by last call (or zero if no code available).
userMsgOptional user message.
Returns
Error message as a string including Err::LastError, if available.
// ERROR (11): Parameter out of range (RANGE_ERROR)
// ERROR (21): No match found (NO_MATCH_ERROR): (1) Cannot open input file (OPEN_ERROR): Private key does not match any certificate in list

◆ LastError()

static std::string dipki::Err::LastError ( )
static

Retrieve the last error message (if available).

Returns
Error message from last call (may be empty).
Remarks
Call this immediately when an error is detected. Calling another method will overwrite the message.
Copyright © 2004-24 D.I. Management Services Pty Limited t/a CryptoSys ABN 78 083 210 584 Australia. All rights reserved. <www.di-mgt.com.au> <www.cryptosys.net>. Generated on Mon Sep 23 2024 15:37:33 by Doxygen 1.9.1.