Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Relevant replacement documents include:
PublicUtility/CAException.h
/* |
<codex> |
<abstract>Part of CoreAudio Utility Classes</abstract> |
<\codex> |
*/ |
#if !defined(__CAException_h__) |
#define __CAException_h__ |
//============================================================================= |
// Includes |
//============================================================================= |
#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) |
#include <CoreAudio/CoreAudioTypes.h> |
#else |
#include "CoreAudioTypes.h" |
#endif |
//============================================================================= |
// CAException |
//============================================================================= |
class CAException |
{ |
public: |
CAException(OSStatus inError) : mError(inError) {} |
CAException(const CAException& inException) : mError(inException.mError) {} |
CAException& operator=(const CAException& inException) { mError = inException.mError; return *this; } |
~CAException() {} |
OSStatus GetError() const { return mError; } |
protected: |
OSStatus mError; |
}; |
#define CATry try{ |
#define CACatch } catch(...) {} |
#define CASwallowException(inExpression) try { inExpression; } catch(...) {} |
#endif |
Copyright © 2012 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2012-10-08