JavaTM Platform
Standard Ed. 6

java.sql
클래스 SQLException

java.lang.Object 
  상위를 확장 java.lang.Throwable 
      상위를 확장 java.lang.Exception 
          상위를 확장 java.sql.SQLException
모든 구현된 인터페이스:
Serializable , Iterable <Throwable >
직계의 기존의 서브 클래스:
BatchUpdateException , RowSetWarning , SerialException , SQLClientInfoException , SQLNonTransientException , SQLRecoverableException , SQLTransientException , SQLWarning , SyncFactoryException , SyncProviderException


public class SQLException
extends Exception
implements Iterable <Throwable >

데이타베이스 액세스 에러 또는 그 외의 에러에 관한 정보를 제공하는 예외입니다.

SQLException 는 다음과 같은 정보를 제공합니다.

관련 항목:
직렬화 된 형식

생성자 의 개요
SQLException ()
          SQLException 객체를 구축합니다.
SQLException (String  reason)
          지정의 reasonSQLException 객체를 구축합니다.
SQLException (String  reason, String  SQLState)
          지정의 reasonSQLStateSQLException 객체를 구축합니다.
SQLException (String  reason, String  SQLState, int vendorCode)
          지정의 reason,SQLState, 및 vendorCodeSQLException 객체를 구축합니다.
SQLException (String  reason, String  sqlState, int vendorCode, Throwable  cause)
          지정의 reason,SQLState,vendorCode, 및 causeSQLException 객체를 구축합니다.
SQLException (String  reason, String  sqlState, Throwable  cause)
          지정의 reason,SQLState, 및 causeSQLException 객체를 구축합니다.
SQLException (String  reason, Throwable  cause)
          지정의 reasoncauseSQLException 객체를 구축합니다.
SQLException (Throwable  cause)
          지정의 causeSQLException 객체를 구축합니다.
 
메소드의 개요
 int getErrorCode ()
          이 SQLException 객체의 벤더 고유의 예외 코드를 가져옵니다.
 SQLException getNextException ()
          setNextException(SQLException ex)에 의해 이 SQLException 객체에 체인 된 예외를 가져옵니다.
 String getSQLState ()
          이 SQLException 객체의 SQLState 를 가져옵니다.
 Iterator <Throwable > iterator ()
          체인 된 SQLException 에 대한 반복자를 돌려줍니다.
 void setNextException (SQLException  ex)
          체인의 마지막에 SQLException 객체를 추가합니다.
 
클래스 java.lang. Throwable 로부터 상속된 메소드
fillInStackTrace , getCause , getLocalizedMessage , getMessage , getStackTrace , initCause , printStackTrace , printStackTrace , printStackTrace , setStackTrace , toString
 
클래스 java.lang. Object 로부터 상속된 메소드
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait
 

생성자 의 상세

SQLException

public SQLException(String  reason,
                    String  SQLState,
                    int vendorCode)
지정의 reason,SQLState, 및 vendorCodeSQLException 객체를 구축합니다. cause 는 초기화되지 않습니다. Throwable.initCause(java.lang.Throwable) 메소드를 호출하는 것에 의해, 나중에 이것을 초기화할 수 있습니다.  

파라미터:
reason - 예외의 설명
SQLState - 예외를 식별하는 XOPEN 코드 또는 SQL:2003 코드
vendorCode - 데이타베이스 벤더 고유의 예외 코드

SQLException

public SQLException(String  reason,
                    String  SQLState)
지정의 reasonSQLStateSQLException 객체를 구축합니다. cause 는 초기화되지 않습니다. Throwable.initCause(java.lang.Throwable) 메소드를 호출하는 것에 의해, 나중에 이것을 초기화할 수 있습니다. 벤더 코드는 0 에 초기화됩니다.  

파라미터:
reason - 예외의 설명
SQLState - 예외를 식별하는 XOPEN 코드 또는 SQL:2003 코드

SQLException

public SQLException(String  reason)
지정의 reasonSQLException 객체를 구축합니다. SQLStatenull 에 초기화되어 벤더 코드는 0 에 초기화됩니다. cause 는 초기화되지 않습니다. Throwable.initCause(java.lang.Throwable) 메소드를 호출하는 것에 의해, 나중에 이것을 초기화할 수 있습니다.  

파라미터:
reason - 예외의 설명

SQLException

public SQLException()
SQLException 객체를 구축합니다. reasonSQLStatenull 에 초기화되어 벤더 코드는 0 에 초기화됩니다. cause 는 초기화되지 않습니다. Throwable.initCause(java.lang.Throwable) 메소드를 호출하는 것에 의해, 나중에 이것을 초기화할 수 있습니다.  


SQLException

public SQLException(Throwable  cause)
지정의 causeSQLException 객체를 구축합니다. SQLStatenull 에 초기화되어 벤더 코드는 0 에 초기화됩니다. reasoncause==null 의 경우에 null 에 초기화되어cause! =null 의 경우에 cause.toString() 에 초기화됩니다.  

파라미터:
cause - 이 SQLException 의 기가 되는 원인 (나중에 getCause() 메소드로 취득하기 위해서 보존된다). null 치가 허가되고 있어 원인이 존재하지 않는가 불명한 것을 나타내는
도입된 버젼:
1.6

SQLException

public SQLException(String  reason,
                    Throwable  cause)
지정의 reasoncauseSQLException 객체를 구축합니다. SQLStatenull 에 초기화되어 벤더 코드는 0 에 초기화됩니다.  

파라미터:
reason - 예외의 설명
cause - 이 SQLException 의 기가 되는 원인 (나중에 getCause() 메소드로 취득하기 위해서 보존된다). null 치가 허가되고 있어 원인이 존재하지 않는가 불명한 것을 나타내는
도입된 버젼:
1.6

SQLException

public SQLException(String  reason,
                    String  sqlState,
                    Throwable  cause)
지정의 reason,SQLState, 및 causeSQLException 객체를 구축합니다. 벤더 코드는 0 에 초기화됩니다.  

파라미터:
reason - 예외의 설명
sqlState - 예외를 식별하는 XOPEN 코드 또는 SQL:2003 코드
cause - 이 SQLException 의 기가 되는 원인 (나중에 getCause() 메소드로 취득하기 위해서 보존된다). null 치가 허가되고 있어 원인이 존재하지 않는가 불명한 것을 나타내는
도입된 버젼:
1.6

SQLException

public SQLException(String  reason,
                    String  sqlState,
                    int vendorCode,
                    Throwable  cause)
지정의 reason,SQLState,vendorCode, 및 causeSQLException 객체를 구축합니다.  

파라미터:
reason - 예외의 설명
sqlState - 예외를 식별하는 XOPEN 코드 또는 SQL:2003 코드
vendorCode - 데이타베이스 벤더 고유의 예외 코드
cause - 이 SQLException 의 기가 되는 원인 (나중에 getCause() 메소드로 취득하기 위해서 보존된다). null 치가 허가되고 있어 원인이 존재하지 않는가 불명한 것을 나타내는
도입된 버젼:
1.6
메소드의 상세

getSQLState

public String  getSQLState()
SQLException 객체의 SQLState 를 가져옵니다.

반환값:
SQLState 치

getErrorCode

public int getErrorCode()
SQLException 객체의 벤더 고유의 예외 코드를 가져옵니다.

반환값:
벤더의 에러 코드

getNextException

public SQLException  getNextException()
setNextException(SQLException ex)에 의해 이 SQLException 객체에 체인 된 예외를 가져옵니다.

반환값:
체인의 다음의 SQLException 객체. 없는 경우는 null
관련 항목:
setNextException(java.sql.SQLException)

setNextException

public void setNextException(SQLException  ex)
체인의 마지막에 SQLException 객체를 추가합니다.

파라미터:
ex - SQLException 체인의 마지막에 추가되는 새로운 예외
관련 항목:
getNextException()

iterator

public Iterator <Throwable > iterator()
체인 된 SQLException 에 대한 반복자를 돌려줍니다. 반복자는, 각 SQLException 와 그 기본으로 되는 원인 (존재하는 경우)을 반복하기 위해서 사용됩니다.

정의:
인터페이스 Iterable <Throwable > 내의 iterator
반환값:
체인 된 SQLException 와 원인을 적절한 순서로 반복 처리 하는 반복자
도입된 버젼:
1.6

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.