1 28 29 package com.caucho.vfs; 30 31 import com.caucho.util.ExceptionWrapper; 32 33 import java.io.IOException ; 34 35 40 public class ClientDisconnectException extends IOException 41 implements ExceptionWrapper { 42 private Exception exn; 43 44 public ClientDisconnectException() 45 { 46 } 47 48 public ClientDisconnectException(String msg) 49 { 50 super(msg); 51 } 52 53 public ClientDisconnectException(Exception exn) 54 { 55 super(String.valueOf(exn)); 56 57 this.exn = exn; 58 } 59 60 64 public static IOException create(IOException exn) 65 { 66 if (exn.getClass().equals(IOException .class) || 67 exn.getClass().equals(java.net.SocketException .class) || 68 exn.getClass().getName().equals("javax.net.ssl.SSLException")) 69 return new ClientDisconnectException(exn); 70 else 71 return exn; 72 } 73 74 public Throwable getRootCause() 75 { 76 return exn; 77 } 78 } 79 | Popular Tags |