📄 comexception.java
字号:
//******************************************************************
// Released under the DevelopMentor OpenSource Software License.
// Please consult the LICENSE file in the project root directory,
// or at http://www.develop.com for details before using this
// software.
//******************************************************************
package org.jawin;
public class COMException extends Exception {
public final int hresult;
public static final int E_UNEXPECTED = 0x8000ffff;
public COMException() {
this(E_UNEXPECTED);
}
public COMException(int hresult) {
//COMEBACK and get error string
this.hresult = hresult;
}
public COMException(int hresult, String text) {
super(text);
this.hresult = hresult;
}
public COMException(int hresult, String desc, String source, String guid) {
super (desc + "[src=" + source + ",guid=" + guid+ "]");
this.hresult = hresult;
}
public COMException(String text) {
this(E_UNEXPECTED, text);
}
public String getMessage() {
return Integer.toHexString(hresult) + ": "
+ super.getMessage();
}
public COMException(Throwable t) {
this(E_UNEXPECTED, t.getMessage());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -