1 7 8 package java.sql; 9 10 27 public class SQLWarning extends SQLException { 28 29 37 public SQLWarning(String reason, String SQLstate, int vendorCode) { 38 super(reason, SQLstate, vendorCode); 39 DriverManager.println("SQLWarning: reason(" + reason + 40 ") SQLstate(" + SQLstate + 41 ") vendor code(" + vendorCode + ")"); 42 } 43 44 45 53 public SQLWarning(String reason, String SQLstate) { 54 super(reason, SQLstate); 55 DriverManager.println("SQLWarning: reason(" + reason + 56 ") SQLState(" + SQLstate + ")"); 57 } 58 59 66 public SQLWarning(String reason) { 67 super(reason); 68 DriverManager.println("SQLWarning: reason(" + reason + ")"); 69 } 70 71 77 public SQLWarning() { 78 super(); 79 DriverManager.println("SQLWarning: "); 80 } 81 82 83 89 public SQLWarning getNextWarning() { 90 try { 91 return ((SQLWarning )getNextException()); 92 } catch (ClassCastException ex) { 93 throw new Error ("SQLWarning chain holds value that is not a SQLWarning"); 97 } 98 } 99 100 106 public void setNextWarning(SQLWarning w) { 107 setNextException(w); 108 } 109 110 } 111 | Popular Tags |