📄 base_exception.h
字号:
/*
Copyright (c) 2008, Intel Corporation.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*///==============================================================================// base_Exception.h : Declaration of base class IntelMobileException//==============================================================================#ifndef _BINDING_BASE_EXCEPTION_H#define _BINDING_BASE_EXCEPTION_H#include "inc/framework/win2linux.h"#include "inc/framework/basetypes.h"#include "base_StringObject.h"#define TRYBLOCK try#define CATCHBLOCK \ catch ( Intel::Mobile::BaseAPI::IntelMobileException ime ) { \ int type = ime.GetExceptionType(); \ if ( type == 0 ) \ { \ throw Intel::Mobile::Base::IntelMobileException(ime.GetGeneralMessage(), ime.GetSource(), ime.GetTargetSite(), ime.GetErrorCode(), ime.GetDetailErrorInfo()); \ } \ else if ( type == 1 ) \ { \ throw Intel::Mobile::Base::InvalidOperationException(ime.GetSource(), ime.GetTargetSite(), ime.GetErrorCode(), ime.GetDetailErrorInfo()); \ } \ else if ( type == 2 ) \ { \ throw Intel::Mobile::Base::InvalidInterfaceException(ime.GetSource(), ime.GetTargetSite(), ime.GetErrorCode(), ime.GetDetailErrorInfo()); \ } \ else \ { \ throw Intel::Mobile::Base::IntelMobileException( IntelMobileText("Unknown Type Exception") ); \ } \ } \ catch( Intel::Mobile::Base::IntelMobileException cime ) { \ throw cime; \ } \ catch(...) { \ throw Intel::Mobile::Base::IntelMobileException(); \ }//Throw NULL condition exception#define THROWNE(classlocation,methodlocation) \ throw Intel::Mobile::Base::IntelMobileException(IntelMobileText("Invalid Object: Object is NULL."),classlocation,methodlocation,NULL,NULL) //Throw NEW operation exception/*#define THROWNEW(classlocation,methodlocation) \ throw Intel::Mobile::Base::IntelMobileException(IntelMobileText("Can not new an object."), classlocation, methodlocation, NULL, NULL)*///==============================================================================class CObserverWrapper;namespace Intel{ namespace Mobile { namespace Display { class DisplayAdapterClass; class DisplayAdapterCollection; class DisplayAdapterInstance; class OrientationEnumProperty; class ScreenStateEnumProperty; }; //========================================================================== //for friend class //========================================================================== namespace Battery { class BatteryClass; class BatteryCollection; class BatteryInstance; class ConditionEnumProperty; }; namespace Context { class BandwidthInstance; class ContextClass; class ContextCollection; class ContextInstance; class ConnectivityInstance; class PowerInstance; class StorageInstance; class DisplayInstance; class SourceEnumProperty; class StateEnumProperty; } namespace Platform { class FeatureEnumProperty; class FeatureEnumArrayProperty; } namespace Network { class LinkProtocolClass; class LinkProtocolCollection; class LinkProtocolInstance; class NetworkAdapterClass; class NetworkAdapterCollection; class NetworkAdapterInstance; class Protocol802_11Class; class Protocol802_11Collection; class Protocol802_11Instance; class Protocol802_3Class; class Protocol802_3Collection; class Protocol802_3Instance; class ProtocolWimaxClass; class ProtocolWimaxCollection; class ProtocolWimaxInstance; class ProtocolWwanClass; class ProtocolWwanCollection; class ProtocolWwanInstance; class ProtocolGprsClass; class ProtocolGprsCollection; class ProtocolGprsInstance; class ProtocolCdmaClass; class ProtocolCdmaCollection; class ProtocolCdmaInstance; class RadioAdapterClass; class RadioAdapterCollection; class RadioAdapterInstance; class WiredAdapterClass; class WiredAdapterCollection; class WiredAdapterInstance; class ProtocolBluetoothPanClass; class ProtocolBluetoothPanCollection; class ProtocolBluetoothPanInstance; //Network class AdapterLinkEnumProperty; class ConnectionStateEnumProperty; class ProtocolStateEnumProperty; class OperatingModeEnumProperty; class WlanPowerModeEnumProperty; class CardTypeEnumProperty; class HardwareRadioStateEnumProperty; class SoftwareRadioStateEnumProperty; class WlanBandEnumProperty; class BandEnumProperty; class AuthenticationModeEnumProperty; class WlanEncryptionModeEnumProperty; class AssociationStateEnumProperty; class SecurityModeEnumProperty; class QosEnumProperty; class WwanEncryptionModeEnumProperty; class WwanPowerModeEnumProperty; class ChannelStateEnumProperty; class RoamingStateEnumProperty; class ServiceIndicationEnumProperty; class CallStateEnumProperty; class WwanBandEnumProperty; class CallCategoryEnumProperty; class LinkQualityEnumProperty; class GprsClassEnumProperty; class AnswerStateEnumProperty; class ProtocolRevisionEnumProperty; class ModulationTypeEnumProperty; class WlanBandEnumArrayProperty; class BandEnumArrayProperty; class ModulationTypeEnumArrayProperty; class SecurityModeEnumArrayProperty; class WwanEncryptionModeEnumArrayProperty; class WlanEncryptionModeEnumArrayProperty; class HciVersionEnumProperty; class LmpVersionEnumProperty; class MajorDeviceClassEnumProperty; class ServiceClassEnumArrayProperty; }; namespace Storage { class PhysicalDiskClass; class PhysicalDiskCollection; class PhysicalDiskInstance; class LogicalDiskClass; class LogicalDiskCollection; class LogicalDiskInstance; class MemoryClass; class MemoryCollection; class MemoryInstance; class InterfaceEnumProperty; class MediaEnumProperty; class AccessEnumProperty; class FormatEnumProperty; class LocationEnumProperty; }; namespace Platform { class PlatformClass; class PlatformCollection; class PlatformInstance; }; namespace Processor { class ProcessorClass; class ProcessorCollection; class ProcessorInstance; class X86ProcessorInstance; class CoreInstance; class X86CoreInstance; class LogicalInstance; class X86LogicalInstance; class ArmProcessorInstance; class ArmCoreInstance; class ArmLogicalInstance; class HtStateEnumProperty; class CacheTypeEnumProperty; class X86FeatureEnumArrayProperty; class ArmFeatureEnumArrayProperty; }; namespace Rfid { class RfidReaderClass; class RfidReaderCollection; class RfidReaderInstance; class ConnectionInterfaceEnumProperty; class BaudRateEnumProperty; }; namespace Threshold { class ByteCounterThreshold; class ByteGaugeThreshold; class CounterThreshold; class DateCounterThreshold; class DateGaugeThreshold; class FloatGaugeThreshold; class GaugeThreshold; class Int64CounterThreshold; class Int64GaugeThreshold; class IntCounterThreshold; class IntGaugeThreshold; class StringValueThreshold; class UInt64CounterThreshold; class UInt64GaugeThreshold; class UIntCounterThreshold; class UIntGaugeThreshold; class ValueThreshold; }; namespace Base { class ArrayProperty; class BoolArrayProperty; class BoolProperty; class ByteArrayProperty; class ByteProperty; class ClassObject; class ConditionTypeProperty; class DateTimeArrayProperty; class DateTimeProperty; class Event; class EventBase; class EventProperty; class FloatArrayProperty; class FloatProperty; class InstanceCollection; class InstanceObject; class Int64ArrayProperty; class Int64Property; class IntArrayProperty; class IntProperty; class Object; class Observer; class Property; class PowerSourceTypeProperty; class StringArrayProperty; class StringProperty; class Threshold; class UInt64ArrayProperty; class UInt64Property; class UIntArrayProperty; class UIntProperty; class ServerContext; template <class T> class VectorObject; }; //========================================================================== namespace Base { class IntelMobileException { friend class Intel::Mobile::Display::DisplayAdapterClass; friend class Intel::Mobile::Display::DisplayAdapterCollection;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -