1 19 package org.netbeans.mdr.persistence.jdbcimpl; 20 21 import org.netbeans.mdr.persistence.*; 22 import java.sql.*; 23 import java.io.*; 24 25 33 public class JdbcStorageException extends StorageBadRequestException 34 { 35 38 private SQLException sqlException; 39 40 43 public JdbcStorageException(SQLException err) 44 { 45 super(err.getMessage()); 46 sqlException = err; 47 } 48 49 50 public String getMessage() 51 { 52 return sqlException.getMessage(); 53 } 54 55 56 public String getLocalizedMessage() 57 { 58 return sqlException.getLocalizedMessage(); 59 } 60 61 62 public void printStackTrace() 63 { 64 sqlException.printStackTrace(); 65 } 66 67 68 public void printStackTrace(PrintStream ps) 69 { 70 sqlException.printStackTrace(ps); 71 } 72 73 74 public void printStackTrace(PrintWriter pw) 75 { 76 sqlException.printStackTrace(pw); 77 } 78 79 80 public Throwable getCause() 81 { 82 return sqlException.getNextException(); 83 } 84 } 85 86 | Popular Tags |