Rogue Wave Views
Studio Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Types | Public Member Functions
IlvStIError Class Reference

Inspector class. More...

#include <ivstudio/inspectors/insperr.h>

Inherits IlvStObject.

Public Types

enum  Severity { Information, Warning, Fatal }
 This enumeration type defines the error severity. More...
 

Public Member Functions

 IlvStIError (const char *msg=0, Severity severity=Fatal)
 Constructor from a single message. More...
 
 IlvStIError (const char *msg, const char *param1, Severity severity=Fatal)
 Constructor from a computed message. More...
 
 IlvStIError (const char *msg, const char *param1, const char *param2, Severity severity=Fatal)
 Constructor from a computed message. More...
 
virtual char * getMessage (IlvDisplay *display) const
 Returns the error message. More...
 
Severity getSeverity () const
 Returns the severity level of the error. More...
 
void setSeverity (Severity severity)
 Sets the severity level of the error. More...
 

Detailed Description

Inspector class.

Library: ivstudio

Errors generated by inspector classes are objects of this class. This class defines an error message and a severity level.

See also
IlvStIAccessor.

Member Enumeration Documentation

§ Severity

This enumeration type defines the error severity.

Enumerator
Information 

The error is an information.

Warning 

The error is a warning.

Fatal 

The error is an important error, the application will be stopped.

Constructor & Destructor Documentation

§ IlvStIError() [1/3]

IlvStIError::IlvStIError ( const char *  msg = 0,
Severity  severity = Fatal 
)

Constructor from a single message.

Parameters
msgThe error message, it can be a key to a message database.
severityThe error severity.

§ IlvStIError() [2/3]

IlvStIError::IlvStIError ( const char *  msg,
const char *  param1,
Severity  severity = Fatal 
)

Constructor from a computed message.

This error message contains one or more %1 substrings, which will be replaced by the param1 parameter. Let us suppose that msg equals to "The name %1 is not valid", and param1 is "2b3" the final error message will be as follows "The name 2b3 is not valid".

Parameters
msgThe error message, it can be a key to a message database.
param1The value of the placeholder "%1".
severityThe error severity.

§ IlvStIError() [3/3]

IlvStIError::IlvStIError ( const char *  msg,
const char *  param1,
const char *  param2,
Severity  severity = Fatal 
)

Constructor from a computed message.

This error message contains one or more %1 and %2 substrings, which will be replaced by the param1 and param2 parameters, respectively. Let us suppose that msg equals to "The %1 county is not in %2", param1 is "Madison", and param2 is "France", the final error message will be: "The Madison county is not in France".

Parameters
msgThe error message, it can be a key to a message database.
param1The value of the named value "%1".
param2The value of the named value "%2".
severityThe error severity.

Member Function Documentation

§ getMessage()

virtual char* IlvStIError::getMessage ( IlvDisplay display) const
virtual

Returns the error message.

Parameters
displayIt is used to retrieve the message matching the key when the message is stored into a message database.
Returns
The error message.

§ getSeverity()

Severity IlvStIError::getSeverity ( ) const

Returns the severity level of the error.

Returns
The severity level of the error.

§ setSeverity()

void IlvStIError::setSeverity ( Severity  severity)

Sets the severity level of the error.

Parameters
severityThe new error severity.

© Copyright 2017, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.