Results 1 to 6 of 6

Thread: Exception handling in PL/SQL

  1. #1
    Join Date
    Jul 2009
    Posts
    140

    Exception handling in PL/SQL

    Hello sir,

    I have a question which is in my mind from lat two weeks .I need to know about the table behavior means the tables.suppose I have a table named nikki and I inserts some character values in the column which is defined as number column and it occurs some error which is system defined and I need to convert the errors according to me.Is it possible.

    Thanks.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Exception handling in PL/SQL

    Exception handling in PL/SQL

    Obviously,you can do it with oracle database tables but one thing should be noted that you have to pass the name of table in the block which is structured by programming code and the language would be PL/SQL.

    Yeah,that's right,you have to create a structure of programming and pass your tables in the execution part and define the related error in the exception part of the structure which will interact with the coding part and the error would be generated what you write in the exception box.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Exception handling in PL/SQL

    Structure of PL/SQL Exception :

    You can use this syntax to use the exception for the problem which you need to solve,The syntax for the exception handling is divided in different sections and each block is responsible for performing different task -

    The syntax would be as follows:

    Code:
     DECLARE
    
       Declaration section 
    
     BEGIN 
    
       Exception section 
    
     EXCEPTION 
    
     WHEN e_link1 THEN 
    
        -Error handling statements 
    
     WHEN e_link2 THEN 
    
        -Error handling statements 
    
     WHEN Others THEN 
    
       -Error handling statements 
    
    END;

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Types of exceptions

    Types of exceptions

    The exceptions has different types which is incorporated with the PL/SQL statements and very valuable thing for the large applications.

    Types of exceptions :
    1- Named System Exceptions
    2- Unnamed System Exceptions
    3- User-defined Exceptions

    These are the three exceptions types.The System exceptions are automatically raised by Oracle where as the user defined exceptions are defined manually by the user.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Named System Exceptions in PL/SQL

    Named System Exceptions

    System exceptions are raised quickly by the oracle database and it is system defined that's why they are treated as pre-defined exceptions and the Oracle database provides a specific name for these exceptions and converted into the Named System Exceptions.

    The Named System Exceptions is also divide into three types:

    1) Not Declared explicitly
    2) Raised implicitly when a predefined Oracle error occurs,
    3) caught by referencing the standard name within an exception-handling routine

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    RAISE_APPLICATION_ERROR ( ) function

    RAISE_APPLICATION_ERROR ( )

    RAISE_APPLICATION_ERROR is a system defined function by the oracle which is used to named for the user-defined errors messages associated with the related error number which contains the range between -20000 and -20999.

    It takes the following form to implement :

    Code:
    RAISE_APPLICATION_ERROR (error_number, error_message);

Similar Threads

  1. Exception Handling in .Net
    By Bruno007 in forum Software Development
    Replies: 5
    Last Post: 25-12-2010, 01:30 AM
  2. Exception Handling in Singleton
    By Bottlenecked in forum Software Development
    Replies: 6
    Last Post: 20-09-2010, 09:14 PM
  3. Exception handling in EJB
    By KennedII in forum Software Development
    Replies: 5
    Last Post: 25-02-2010, 04:40 AM
  4. Problem in handling exception with Regex
    By Gunner 1 in forum Software Development
    Replies: 5
    Last Post: 16-02-2010, 01:56 AM
  5. Exception Handling in Csharp
    By Jesus2 in forum Software Development
    Replies: 3
    Last Post: 11-11-2009, 11:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,651,149.75829 seconds with 17 queries