pub struct CapeError {
pub(crate) interface: *mut ICapeError,
}Expand description
Error description from CAPE-OPEN object
Each CAPE-OPEN interface has an getLastError member function that returns an error interface for any call that results COBIAERR_CAPEOPENERROR.
This is a smart pointer to manage the error object and call its members.
Fields§
§interface: *mut ICapeErrorImplementations§
Source§impl CapeError
impl CapeError
Sourcepub fn from_interface_pointer(interface: *mut ICapeError) -> Self
pub fn from_interface_pointer(interface: *mut ICapeError) -> Self
Create a new CapeError from an ICapeError interface pointer.
The CapeError object is not typically used directly. Errors are managed through the COBIAError object, which also manages the CapeError based errors raised by CAPE-OPEN objects.
§Arguments
interface- A pointer to an ICapeError interface
§Safety
The interface pointer must be non-null and must point to an object that implements the ICapeError interface.
§Panics
Panics if the interface pointer is null.
Sourcepub fn attach(interface: *mut ICapeError) -> Self
pub fn attach(interface: *mut ICapeError) -> Self
Create a new CapeError from an ICapeError interface pointer without adding a reference.
The CapeError object is not typically used directly. Errors are managed through the COBIAError object, which also manages the CapeError based errors raised by CAPE-OPEN objects.
§Arguments
interface- A pointer to an ICapeError interface
§Safety
The interface pointer must be non-null and must point to an object that implements the ICapeError interface.
§Panics
Panics if the interface pointer is null.
Sourcepub fn get_error_text(&self) -> Result<String, COBIAError>
pub fn get_error_text(&self) -> Result<String, COBIAError>
Get the error text
Gets the error text from the error interface. The error text is descriptive information about the nature of the error.
Sourcepub fn get_cause(&self) -> Option<CapeError>
pub fn get_cause(&self) -> Option<CapeError>
Get the error that caused this error.
Sometimes an error is casued by another error. If so, the error that causes this error is available through this function.
Sourcepub fn get_source(&self) -> Result<String, COBIAError>
pub fn get_source(&self) -> Result<String, COBIAError>
Get the error source
The error source is a descriptive name of the object that raised the error.
Sourcepub fn get_scope(&self) -> Result<String, COBIAError>
pub fn get_scope(&self) -> Result<String, COBIAError>
Get the error scope
The error scope is the function that was being executed when the error was raised.
Trait Implementations§
Source§impl Clone for CapeError
Add pointer reference
impl Clone for CapeError
Add pointer reference
ICapeError derives from ICobiaBase, which contains addReference() and release(). The Clone trait calls addReference.