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.osgi.framework.Bundle;
19 import org.seasar.uruma.core.UrumaMessageCodes;
20
21 /**
22 * Uruma アプリケーション初期化失敗時にスローされる例外です。
23 *
24 * @author y-komori
25 */
26 public class UrumaAppInitException extends UrumaRuntimeException implements
27 UrumaMessageCodes {
28
29 private static final long serialVersionUID = -3995331336671147648L;
30
31 /**
32 * {@link UrumaAppInitException} を構築します。<br />
33 *
34 * @param bundle
35 * 対象 {@link Bundle} オブジェクト
36 */
37 public UrumaAppInitException(final Bundle bundle) {
38 super(URUMA_APP_STARTING_FAILED, bundle.getSymbolicName());
39 }
40
41 /**
42 * {@link UrumaAppInitException} を構築します。<br />
43 *
44 * @param bundle
45 * 対象 {@link Bundle} オブジェクト
46 * @param detail
47 * 詳細原因
48 */
49 public UrumaAppInitException(final Bundle bundle, final String detail) {
50 super(URUMA_APP_STARTING_FAILED, bundle.getSymbolicName(), detail);
51 }
52
53 /**
54 * {@link UrumaAppInitException} を構築します。<br />
55 *
56 * @param bundle
57 * 対象 {@link Bundle} オブジェクト
58 * @param cause
59 * 原因となった例外オブジェクト
60 * @param detail
61 * 詳細原因
62 */
63 public UrumaAppInitException(final Bundle bundle, final Throwable cause,
64 final String detail) {
65 super(URUMA_APP_STARTING_FAILED, cause, bundle.getSymbolicName(),
66 detail);
67 }
68 }