OSDN Git Service

TODOなし
[train-delayed/source.git] / workspace / TrainDelayed / src / com / td / utility / ExceptionUtil.java
1 package com.td.utility;
2
3 import android.os.RemoteException;
4 import android.util.Log;
5
6 public class ExceptionUtil {
7         public static final String TAG_E10 = "com.td.e10";
8         public static final String TAG_E20 = "com.td.e20";
9         public static final String TAG_E30 = "com.td.e30";
10         public static final String TAG_E40 = "com.td.e40";
11         public static final String TAG_E41 = "com.td.e41";
12         public static final String TAG_E42 = "com.td.e42";
13         public static final String TAG_E50 = "com.td.e50";
14         public static final String TAG_E60 = "com.td.e60";
15         public static final String TAG_E70 = "com.td.e70";
16         public static final String TAG_E80 = "com.td.e80";
17         public static final String TAG_E90 = "com.td.e90";
18
19         private static ExceptionUtil instance = null;
20         
21         public static ExceptionUtil getInstance(){
22                 if (instance == null){
23                         instance = new ExceptionUtil();
24                 }
25                 return instance;
26         }
27         
28         private ExceptionUtil(){
29                 
30         }
31         
32         public void throwException(String tag) throws Exception{
33                 if (Log.isLoggable(tag, Log.DEBUG)){
34                         throw new Exception();
35                 }
36         }
37
38         public void throwRemoteException(String tag) throws RemoteException{
39                 if (Log.isLoggable(tag, Log.DEBUG)){
40                         throw new RemoteException();
41                 }
42         }
43
44         public boolean isDebug(String tag) {
45                 return Log.isLoggable(tag, Log.DEBUG);
46         }
47 }