1 /* 2 * Copyright 2004-2008 the Seasar Foundation and the Others. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 13 * either express or implied. See the License for the specific language 14 * governing permissions and limitations under the License. 15 */ 16 package org.seasar.uruma.exception; 17 18 import org.seasar.uruma.core.UrumaConstants; 19 import org.seasar.uruma.core.UrumaMessageCodes; 20 import org.seasar.uruma.util.win32.Win32Util; 21 22 /** 23 * Win32API 呼び出しに関する問題発生時にスローされる例外です。<br /> 24 * 25 * @author y-komori 26 */ 27 public class Win32ApiException extends UrumaRuntimeException implements 28 UrumaConstants { 29 30 private static final long serialVersionUID = 214038110299619208L; 31 32 /** 33 * {@link Win32ApiException} を構築します。<br /> 34 * 35 * @param message 36 * メッセージ 37 */ 38 public Win32ApiException(final String message) { 39 super(UrumaMessageCodes.WIN32_API_CALL_FAILED, NULL_STRING, message); 40 } 41 42 /** 43 * {@link Win32ApiException} を構築します。<br /> 44 * 45 * @param funcName 46 * 関数名 47 * @param message 48 * メッセージ 49 */ 50 public Win32ApiException(final String funcName, final String message) { 51 super(UrumaMessageCodes.WIN32_API_CALL_FAILED, funcName, message); 52 } 53 54 /** 55 * {@link Win32ApiException} を構築します。<br /> 56 * 57 * @param funcName 58 * 関数名 59 * @param retCode 60 * リターンコード 61 */ 62 public Win32ApiException(final String funcName, final int retCode) { 63 super(UrumaMessageCodes.WIN32_API_CALL_FAILED, funcName, Win32Util 64 .formatMessage(retCode)); 65 } 66 }