oracle異常捕獲程式碼(轉)
oracle異常捕獲程式碼(轉)[@more@]-- Oracle 異常處理
Exception Raised when ...
ACCESS_INTO_NULL
Your program attempts to assign values to the attributes of an uninitialized (atomically null) object.
CASE_NOT_FOUND
None of the choices in the WHEN clauses of a CASE statement is selected, and there is no ELSE clause.
COLLECTION_IS_NULL
Your program attempts to apply collection methods other than EXISTS to an uninitialized (atomically null) nested table or varray, or the program attempts to assign values to the elements of an uninitialized nested table or varray.
CURSOR_ALREADY_OPEN
Your program attempts to open an already open cursor. A cursor must be closed before it can be reopened. A cursor FOR loop automatically opens the cursor to which it refers. So, your program cannot open that cursor inside the loop.
DUP_VAL_ON_INDEX
Your program attempts to store duplicate values in a database column that is constrained by a unique index.
INVALID_CURSOR
Your program attempts an illegal cursor operation such as closing an unopened cursor.
INVALID_NUMBER
In a SQL statement, the conversion of a character string into a number fails because the string does not represent a valid number. (In procedural statements, VALUE_ERROR is raised.) This exception is also raised when the LIMIT-clause expression in a bulk FETCH statement does not evaluate to a positive number.
LOGIN_DENIED
Your program attempts to log on to Oracle with an invalid username and/or password.
NO_DATA_FOUND
A SELECT INTO statement returns no rows, or your program references a deleted element in a nested table or an uninitialized element in an index-by table. SQL aggregate functions such as AVG and SUM always return a value or a null. So, a SELECT INTO statement that calls an aggregate function never raises NO_DATA_FOUND. The FETCH statement is expected to return no rows eventually, so when that happens, no exception is raised.
NOT_LOGGED_ON
Your program issues a database call without being connected to Oracle.
PROGRAM_ERROR
PL/SQL has an internal problem.
ROWTYPE_MISMATCH
The host cursor variable and PL/SQL cursor variable involved in an assignment have incompatible return types. For example, when an open host cursor variable is passed to a stored subprogram, the return types of the actual and formal parameters must be compatible.
SELF_IS_NULL
Your program attempts to call a MEMBER method on a null instance. That is, the built-in parameter SELF (which is always the first parameter passed to a MEMBER method) is null.
STORAGE_ERROR
PL/SQL runs out of memory or memory has been corrupted.
SUBs cript_BEYOND_COUNT
Your program references a nested table or varray element using an index number larger than the number of elements in the collection.
SUBs cript_OUTSIDE_LIMIT
Your program references a nested table or varray element using an index number (-1 for example) that is outside the legal range.
SYS_INVALID_ROWID
The conversion of a character string into a universal rowid fails because the character string does not represent a valid rowid.
TIMEOUT_ON_RESOURCE
A time-out occurs while Oracle is waiting for a resource.
TOO_MANY_ROWS
A SELECT INTO statement returns more than one row.
VALUE_ERROR
An arithmetic, conversion, truncation, or size-constraint error occurs. For example, when your program selects a column value into a character variable, if the value is longer than the declared length of the variable, PL/SQL aborts the assignment and raises VALUE_ERROR. In procedural statements, VALUE_ERROR is raised if the conversion of a character string into a number fails. (In SQL statements, INVALID_NUMBER is raised.)
ZERO_DIVIDE
Your program attempts to divide a number by zero.
Exception Raised when ...
ACCESS_INTO_NULL
Your program attempts to assign values to the attributes of an uninitialized (atomically null) object.
CASE_NOT_FOUND
None of the choices in the WHEN clauses of a CASE statement is selected, and there is no ELSE clause.
COLLECTION_IS_NULL
Your program attempts to apply collection methods other than EXISTS to an uninitialized (atomically null) nested table or varray, or the program attempts to assign values to the elements of an uninitialized nested table or varray.
CURSOR_ALREADY_OPEN
Your program attempts to open an already open cursor. A cursor must be closed before it can be reopened. A cursor FOR loop automatically opens the cursor to which it refers. So, your program cannot open that cursor inside the loop.
DUP_VAL_ON_INDEX
Your program attempts to store duplicate values in a database column that is constrained by a unique index.
INVALID_CURSOR
Your program attempts an illegal cursor operation such as closing an unopened cursor.
INVALID_NUMBER
In a SQL statement, the conversion of a character string into a number fails because the string does not represent a valid number. (In procedural statements, VALUE_ERROR is raised.) This exception is also raised when the LIMIT-clause expression in a bulk FETCH statement does not evaluate to a positive number.
LOGIN_DENIED
Your program attempts to log on to Oracle with an invalid username and/or password.
NO_DATA_FOUND
A SELECT INTO statement returns no rows, or your program references a deleted element in a nested table or an uninitialized element in an index-by table. SQL aggregate functions such as AVG and SUM always return a value or a null. So, a SELECT INTO statement that calls an aggregate function never raises NO_DATA_FOUND. The FETCH statement is expected to return no rows eventually, so when that happens, no exception is raised.
NOT_LOGGED_ON
Your program issues a database call without being connected to Oracle.
PROGRAM_ERROR
PL/SQL has an internal problem.
ROWTYPE_MISMATCH
The host cursor variable and PL/SQL cursor variable involved in an assignment have incompatible return types. For example, when an open host cursor variable is passed to a stored subprogram, the return types of the actual and formal parameters must be compatible.
SELF_IS_NULL
Your program attempts to call a MEMBER method on a null instance. That is, the built-in parameter SELF (which is always the first parameter passed to a MEMBER method) is null.
STORAGE_ERROR
PL/SQL runs out of memory or memory has been corrupted.
SUBs cript_BEYOND_COUNT
Your program references a nested table or varray element using an index number larger than the number of elements in the collection.
SUBs cript_OUTSIDE_LIMIT
Your program references a nested table or varray element using an index number (-1 for example) that is outside the legal range.
SYS_INVALID_ROWID
The conversion of a character string into a universal rowid fails because the character string does not represent a valid rowid.
TIMEOUT_ON_RESOURCE
A time-out occurs while Oracle is waiting for a resource.
TOO_MANY_ROWS
A SELECT INTO statement returns more than one row.
VALUE_ERROR
An arithmetic, conversion, truncation, or size-constraint error occurs. For example, when your program selects a column value into a character variable, if the value is longer than the declared length of the variable, PL/SQL aborts the assignment and raises VALUE_ERROR. In procedural statements, VALUE_ERROR is raised if the conversion of a character string into a number fails. (In SQL statements, INVALID_NUMBER is raised.)
ZERO_DIVIDE
Your program attempts to divide a number by zero.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10617542/viewspace-961521/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 捕獲 React 異常React
- iOS異常捕獲iOS
- DRF之異常捕獲原始碼分析原始碼
- python異常捕獲Python
- 程式碼缺陷解讀:通用異常捕獲宣告缺陷漏洞
- android 異常捕獲-UncaughtExceptionHandlerAndroidException
- 記錄Javascript 異常捕獲JavaScript
- PHP使用trycatch,捕獲異常PHP
- 【筆記】forall 異常捕獲筆記
- 前端異常捕獲與上報前端
- PLSQL宣告部分異常捕獲SQL
- wpf 捕獲全域性異常
- 儲存過程——異常捕獲&列印異常資訊儲存過程
- python中如何捕獲異常Python
- JS 使用try catch捕獲異常JS
- Auth 授權的異常捕獲
- 異常的捕獲及處理
- python動態捕獲異常Python
- 10. 異常捕獲、生成式
- 談談前端異常捕獲與上報前端
- 捕獲不到異常嘗試除以0
- 前端JavaScript 常見的報錯及異常捕獲前端JavaScript
- 異常處理機制(二)之異常處理與捕獲
- spring-boot 統一異常捕獲Springboot
- SpringBoot之全域性捕獲異常Spring Boot
- 在 C++ 中捕獲 Python 異常C++Python
- iOS 日誌重定向和異常捕獲iOS
- C#中有關異常的捕獲演示C#
- Android 全域性異常捕獲之CrashHandlerAndroid
- Auto.js Pro 資料獲取 與 異常捕獲JS
- 前端開發中的Error以及異常捕獲前端Error
- Java捕獲非檢查異常----UncaughtExceptionHandler的使用JavaException
- 捕獲異常URL--scrapy 原始碼分析之retry中介軟體原始碼
- 程式碼安全測試第二十九期:通用異常捕獲宣告缺陷漏洞
- 【Spring Cloud】Feign呼叫異常觸發降級後如何捕獲異常SpringCloud
- 記錄使用 guzzlehttp 異常捕獲踩坑記錄HTTP
- Flutter異常捕獲和Crash崩潰日誌收集Flutter
- IOS系統閃退異常(Crash)捕獲處理iOS