📄 intelmobileexception.java
字号:
/*
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.
*/package com.intel.mobile.base;/** * Base exception for Intel Mobile System. */public class IntelMobileException extends Exception{ protected String m_sMessage; protected String m_sSource; protected String m_sTargetSite; protected String m_sErrorCode; protected String m_sDetailErrorInfo; // Constructor protected IntelMobileException(String sMessage, String sSource, String sSite, String sErrorCode, String sErrorInfo) { super(sMessage); this.m_sMessage = sMessage; this.m_sSource = sSource; this.m_sTargetSite = sSite; this.m_sErrorCode = sErrorCode; this.m_sDetailErrorInfo = sErrorInfo; } /** * Constructor. * @param sMessage General message of this exception. * @param sSource Source type in which this exception is thrown up, i.e. class name * @param sSite Target site where this exception occurs, i.e. method name * @param sErrorCode Error code which is pre-defined in the spec. */ protected IntelMobileException(String sMessage, String sSource, String sSite, String sErrorCode) { this(sMessage, sSource, sSite, sErrorCode, GetDetailErrorInfo(sErrorCode)); } /** * Get general message of this exception. * @return */ public String GetGeneralMessage() { return this.m_sMessage; } /** * Get source type in which this exception is thrown up, i.e. class name * @return */ public String GetSource() { return this.m_sSource; } /** * Get target site where this exception occurs, i.e. method name * @return */ public String GetTargetSite() { return this.m_sTargetSite; } /** * Get error code which is pre-defined in the spec. * @return */ public String GetErrorCode() { return this.m_sErrorCode; } /** * Get error info which is pre-defined in the spec. * @return */ public String GetDetailErrorInfo() { return this.m_sDetailErrorInfo; } /** * Static method to get error info by the error code. * @param sErrorCode * @return */ private static String GetDetailErrorInfo(String sErrorCode) { return GetDetailErrorInfoNative(sErrorCode); } private static native String GetDetailErrorInfoNative(String sErrorCode);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -