Microsoft Information Protection SDK - C++ 1.17
API Reference Documentation for C++
Loading...
Searching...
No Matches
BadInputError Class Reference

Bad input error, thrown when the input to an SDK API is invalid. More...

#include <error.h>

Inheritance diagram for BadInputError:
Error ContentFormatNotSupportedError InsufficientBufferError LabelDisabledError LabelNotFoundError LicenseNotRegisteredError TemplateArchivedError TemplateNotFoundError

Public Types

enum class  ErrorCode {
  General = 0 , FileIsTooLargeForProtection = 1 , ParameterParsing = 2 , LicenseNotTrusted = 3 ,
  DoubleKey = 4 , FileFormatNotSupported = 5
}
 ErrorCode of bad input error. More...
 

Public Member Functions

ErrorCode GetErrorCode () const
 Gets the errorCode of bad input.
 
- Public Member Functions inherited from Error
char const * what () const noexcept override
 Get the error message.
 
virtual std::shared_ptr< ErrorClone () const =0
 Clone the error.
 
virtual ErrorType GetErrorType () const
 Get the error type.
 
const std::string & GetErrorName () const
 Get the error name.
 
const std::string & GetMessage (bool maskPII=false) const
 Get the error message.
 
void SetMessage (const std::string &msg)
 Set the error message.
 
void AddDebugInfo (const std::string &key, const std::string &value, bool sensitive=false)
 Add debug info entry.
 
const std::map< std::string, std::string > & GetDebugInfo () const
 Get debug info.
 

Private Member Functions

const std::string & GetErrorCodeString (ErrorCode code) const
 

Private Attributes

ErrorCode mErrorCode
 

Additional Inherited Members

- Public Attributes inherited from Error
std::string mMessage
 
std::map< std::string, std::string > mDebugInfo
 
std::string mName
 
ErrorType mType
 

Detailed Description

Bad input error, thrown when the input to an SDK API is invalid.

Member Enumeration Documentation

◆ ErrorCode

enum class BadInputError::ErrorCode
strong

ErrorCode of bad input error.

Enumerator
General 

General bad input error

FileIsTooLargeForProtection 

File is too large for protection

ParameterParsing 

Parameter cannot be parsed correctly

LicenseNotTrusted 

Publishing license not issued by trusted source

DoubleKey 

A paremeter for double key encryption is needed and missing

FileFormatNotSupported 

The input file's format is not supported

Member Function Documentation

◆ GetErrorCode()

ErrorCode BadInputError::GetErrorCode ( ) const
inline

Gets the errorCode of bad input.

Returns
ErrorCode of bad input error

◆ GetErrorCodeString()

const std::string & BadInputError::GetErrorCodeString ( ErrorCode code) const
inlineprivate

Member Data Documentation

◆ mErrorCode

ErrorCode BadInputError::mErrorCode
private

The documentation for this class was generated from the following file: