Raise Application Error Out Of Range
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the error number argument to raise application error of 20001 is out of range company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions raise_application_error example Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million ora-06512: at programmers, just like you, helping each other. Join them; it only takes a minute: Sign up raise_application_error of -4091 is out of range on UTL_SMTP.quit up vote 0 down vote favorite I am getting ORA-21000: error sqlcode number argument to raise_application_error of -4091 is out of range on UTL_SMTP.quit(connection); I have SMTP related code in a procedure. so when I run below procedure it works fine. But when i call Send_Mail from a trigger in my application, it's throwing above mentioned error. BEGIN Send_Mail (p_to => 'temp@temp.com', p_from => 'temp@temp.com', p_message => 'Test message', p_smtp_host => 'tempserver' ); END; / Thanks for any help. plsql oracle11g share|improve this question asked Feb 11 '14 at 20:29 Venu 66313 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote From the Oracle Documentation : Defining Your Own Error Messages (RAISE_APPLICATION_ERROR Procedure) The RAISE_APPLICATION_ERROR procedure lets you issue user-defined ORA-n error messages from stored subprograms. That way, you can report errors to your application and avoid returning unhandled exceptions. To invoke RAISE_APPLICATION_ERROR, use the following syntax: raise_application_error( error_number, message[, {TRUE | FALSE}]); where error_number is a negative integer in the range -20000..-20999 and message is a character string up to 2048 bytes long. If the optional third parameter is TRUE, the error is placed on the stack of previous errors. share|improve this answer answered Feb 11 '14 at 21:19 OldProgrammer 6,19831025 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged plsql oracle11g or ask your own question. asked 2 years ago viewed 2768 times active 2 years ago Blog Stack Overflow Podcast #92 - The Guerilla Guide to Interviewing Related 0No
ORA-01429 ORA-01480 ORA-01555 ORA-03237 ORA-04030 ORA-04031 ORA-04091 ORA-12154 ORA-21000 ORA-28009 ORA-28009 PLS-00222 ORA-21000:error number argument to raise_application_error is out of range Submitted by sreemen on Fri, 11/13/2009 - 18:24 ORA-21000:error number argument to raise_application_error is out of range ORA-21000:error number argument to raise_application_error of stringstring is out of range Cause:An attempt was made to specify a number not in the allowed range. Action:Use an error number in the http://stackoverflow.com/questions/21712358/raise-application-error-of-4091-is-out-of-range-on-utl-smtp-quit range of -20000 to -20999, inclusive. ORA-21000: "error number argument to raise_application_error of 0 is out of range": The PL/SQL RAISE_APPLICATION_ERROR procedure has been called with an error code of 0. The only valid error codes are 20000 to 20099. The usualy cause for a value http://ora-21000.ora-code.info/ of 0 being used is that a program has failed to set amn error variable correctly, e.g. it has called an exception but not set the variable. Search Results Enter your keywords: Search the web Search www.ora-code.info View the results at Google, or enable JavaScript to view them here. User login Username: * Password: * Request new password Oracle Errors ORA-00001 ORA-00017 ORA-00018 ORA-00019 ORA-00020 ORA-00021 ORA-00022 ORA-00023 ORA-00024 ORA-00025 ORA-00026 ORA-00027 ORA-00028 ORA-00029 ORA-00030 ORA-00054 ORA-00055 ORA-00060 ORA-00257 ORA-00600 ORA-00604 ORA-00936 ORA-00997 ORA-01000 ORA-01422 ORA-01429 ORA-01480 ORA-01555 ORA-03237 ORA-04030 ORA-04031 ORA-04091 ORA-12154 ORA-21000 ORA-28009 ORA-28009 PLS-00222 Tip of the day Refer to asktom.oracle.com for oracle design and performance related topics Oracle Search Search the web Search www.ora-code.info Recent blog posts Checking and Adding Space to tablespace more Real Time Tariffic Feedjit Live Blog Stats '
to your PL/SQL program. With many programming languages, unless you disable error checking, a run-time error such https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/errors.htm as stack overflow or division by zero stops normal processing and returns control to the operating system. With PL/SQL, a mechanism called exception handling lets you bulletproof your program so that it can continue operating in the presence of errors. This chapter contains these topics: Overview of PL/SQL Runtime Error Handling Advantages raise application of PL/SQL Exceptions Summary of Predefined PL/SQL Exceptions Defining Your Own PL/SQL Exceptions How PL/SQL Exceptions Are Raised How PL/SQL Exceptions Propagate Reraising a PL/SQL Exception Handling Raised PL/SQL Exceptions Overview of PL/SQL Compile-Time Warnings Overview of PL/SQL Runtime Error Handling In PL/SQL, an error condition is called an exception. Exceptions can be raise application error internally defined (by the runtime system) or user defined. Examples of internally defined exceptions include division by zero and out of memory. Some common internal exceptions have predefined names, such as ZERO_DIVIDE and STORAGE_ERROR. The other internal exceptions can be given names. You can define exceptions of your own in the declarative part of any PL/SQL block, subprogram, or package. For example, you might define an exception named insufficient_funds to flag overdrawn bank accounts. Unlike internal exceptions, user-defined exceptions must be given names. When an error occurs, an exception is raised. That is, normal execution stops and control transfers to the exception-handling part of your PL/SQL block or subprogram. Internal exceptions are raised implicitly (automatically) by the run-time system. User-defined exceptions must be raised explicitly by RAISE statements, which can also raise predefined exceptions. To handle raised exceptions, you write separate routines called exception handlers. After an exception handler runs, the current block stops execut