Exceptions handling  for  "submit of  Insert Report "

Dear Experts,
i need to handle Exception "syntax Error" when Submit the inserted report.
i tried " try and Catch " but failed to catch Dump Error.
for example:
Data  CODE TYPE  TABLE OF String .
APPEND   'REPORT ZDYN.'                                 TO Code .
APPEND 'Data Var1 type I   .'          TO Code .
append 'if var > 10 '                         to Code .
append 'Write ''Success''  .  '            to Code .
append 'else. '                                  to Code .
append 'Write ''Failed'' . '                   to Code .
append 'EndIf . '                               to Code .
TRY .
    data Prog TYPE c LENGTH 50 VALUE  'ZDYN'.
    INSERT REPORT Prog FROM CODE .
    SUBMIT Prog AND RETURN .
  CATCH CX_ROOT  .
    raise SYNTAX_ERROR .
ENDTRY.
" in the inserted Report the Variable Name is Var1 NOT Var So it will be Syntax error " DUMP Error ".
Thanks in advance

Hi,
First write the code in a program and check what error you get and try to handle that particular error.
Also a full stop is missing in the code ...
REPORT ZDYN.
Data Var1 type I.
if var > 10 .
Data CODE TYPE TABLE OF String .
APPEND 'REPORT ZDYN.' TO Code .
APPEND 'Data Var1 type I .' TO Code .
append 'if var > 10 .' to Code . <--  Put a full stop here ..
append 'Write ''Success'' . ' to Code .
append 'else. ' to Code .
append 'Write ''Failed'' . ' to Code .
append 'EndIf . ' to Code .
Regards,
Srini.

Similar Messages

  • Exception handling for all the insert statements in the proc

    CREATE PROCEDURE TEST (
    @IncrStartDate DATE
    ,@IncrEndDate DATE
    ,@SourceRowCount INT OUTPUT
    ,@TargetRowCount INT OUTPUT
    ,@ErrorNumber INT OUTPUT
    ,@ErrorMessage VARCHAR(4000) OUTPUT
    ,@InsertCase INT --INSERT CASE INPUT
    WITH
    EXEC AS CALLER AS
    BEGIN --Main Begin
    SET NOCOUNT ON
    BEGIN TRY
    DECLARE @SuccessNumber INT = 0
    ,@SuccessMessage VARCHAR(100) = 'SUCCESS'
    ,@BenchMarkLoadFlag CHAR(1)
    ,@BenchmarkFlow INT
    ,@MonthYearStart DATE
    ,@MonthYearEnd DATE
    ,@StartDate DATE
    ,@EndDate DATE
    /* Setting the default values of output parameters to 0.*/
    SET @SourceRowCount = 0
    SET @TargetRowCount = 0
    /*Setting the Start and end date for looping */
    SET @MonthYearStart = @IncrStartDate;
    SET @MonthYearEnd = @IncrEndDate;
    /* Setting the @InsertCase will ensure case wise insertion as this sp will load data in different tables
    @InsertCase =0 means data will be inserted in the target TAB1
    @InsertCase =1 means data will be inserted in the target TAB2
    @InsertCase =2 means data will be inserted in the target TAB3
    @InsertCase =3 means data will be inserted in the target TAB4
    @InsertCase =4 means data will be inserted in the target TAB5
    @InsertCase =5 means data will be inserted in the target TAB6
    if @InsertCase =0
    WHILE (@MonthYearStart <= @MonthYearEnd)
    BEGIN
    SET @StartDate = @MonthYearStart;
    SET @EndDate = @MonthYearEnd;
    /* Delete from target where date range given from input parameter*/
    DELETE FROM TAB1
    WHERE [MONTH] BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)
    AND [YEAR] BETWEEN year(@StartDate) and year(@EndDate)
    /*Insert data in target-TAB1 */
    BEGIN TRANSACTION
    INSERT INTO TAB1
    A,B,C
    SELECT
    A,BC
    FROM XYZ
    COMMIT TRANSACTION
    SET @MonthYearStart = DATEADD(MONTH, 1, @MonthYearStart)
    SELECT @TargetRowCount = @TargetRowCount + @@ROWCOUNT;
    END -- End of whileloop
    END TRY
    BEGIN CATCH
    IF @@TRANCOUNT>0
    ROLLBACK TRANSACTION
    SELECT @ErrorNumber = ERROR_NUMBER() ,@ErrorMessage = ERROR_MESSAGE();
    END CATCH
    END--End of Main Begin
    I have the above proc inserting data based on parameters  where in @InsertCase  is used for case wise execution.
     I have written the whole proc with exception handling using try catch block.
    I have just added one insert statement here for 1 case  now I need to add further insert  cases
    INSERT INTO TAB4
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    INSERT INTO TAB3
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    INSERT INTO TAB2
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    I will be using following to insert further insert statements 
    if @InsertCase =1 
    I just needed to know where will be my next insert statement should be fitting int his code so that i cover exception handling for all the code
    Mudassar

    Hi Erland & Mudassar, I have attempted to recreate Mudassar's original problem..here is my TABLE script;
    USE [MSDNTSQL]
    GO
    /****** Object: Table [dbo].[TAB1] Script Date: 2/5/2014 7:47:48 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[TAB1](
    [COL1] [nvarchar](1) NULL,
    [COL2] [nvarchar](1) NULL,
    [COL3] [nvarchar](1) NULL,
    [START_MONTH] [int] NULL,
    [END_MONTH] [int] NULL,
    [START_YEAR] [int] NULL,
    [END_YEAR] [int] NULL
    ) ON [PRIMARY]
    GO
    Then here is a CREATE script for the SPROC..;
    USE [MSDNTSQL]
    GO
    /****** Object: StoredProcedure [dbo].[TryCatchTransactions1] Script Date: 2/5/2014 7:51:33 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE PROCEDURE [dbo].[TryCatchTransactions1] (
    @IncrStartDate DATE
    ,@IncrEndDate DATE
    ,@SourceRowCount INT OUTPUT
    ,@TargetRowCount INT OUTPUT
    ,@ErrorNumber INT OUTPUT
    ,@ErrorMessage VARCHAR(4000) OUTPUT
    ,@InsertCase INT --INSERT CASE INPUT
    WITH
    EXEC AS CALLER AS
    BEGIN --Main Begin
    SET NOCOUNT ON
    BEGIN TRY
    DECLARE @SuccessNumber INT = 0
    ,@SuccessMessage VARCHAR(100) = 'SUCCESS'
    ,@BenchMarkLoadFlag CHAR(1)
    ,@BenchmarkFlow INT
    ,@MonthYearStart DATE
    ,@MonthYearEnd DATE
    ,@StartDate DATE
    ,@EndDate DATE
    /* Setting the default values of output parameters to 0.*/
    SET @SourceRowCount = 0
    SET @TargetRowCount = 0
    /*Setting the Start and end date for looping */
    SET @MonthYearStart = @IncrStartDate;
    SET @MonthYearEnd = @IncrEndDate;
    /* Setting the @InsertCase will ensure case wise insertion as this sp will load data in different tables
    @InsertCase =0 means data will be inserted in the target TAB1
    @InsertCase =1 means data will be inserted in the target TAB2
    @InsertCase =2 means data will be inserted in the target TAB3
    @InsertCase =3 means data will be inserted in the target TAB4
    @InsertCase =4 means data will be inserted in the target TAB5
    @InsertCase =5 means data will be inserted in the target TAB6
    IF @InsertCase =0
    WHILE (@MonthYearStart <= @MonthYearEnd)
    BEGIN
    SET @StartDate = @MonthYearStart;
    SET @EndDate = @MonthYearEnd;
    /* Delete from target where date range given from input parameter*/
    DELETE FROM TAB1
    WHERE START_MONTH BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)
    AND START_YEAR BETWEEN year(@StartDate) and YEAR(@EndDate)
    /*Insert data in target-TAB1 */
    BEGIN TRANSACTION
    INSERT INTO TAB1 (COL1,COL2,COL3)
    VALUES ('Z','X','Y')
    SELECT COL1, COL2, COL3
    FROM TAB1
    COMMIT TRANSACTION
    SET @MonthYearStart = DATEADD(MONTH, 1, @MonthYearStart)
    SELECT @TargetRowCount = @TargetRowCount + @@ROWCOUNT;
    END -- End of whileloop
    END TRY
    BEGIN CATCH
    IF @@TRANCOUNT > 0
    ROLLBACK TRANSACTION
    SELECT @ErrorNumber = ERROR_NUMBER() ,@ErrorMessage = ERROR_MESSAGE();
    END CATCH
    PRINT @SUCCESSMESSAGE
    END--End of Main Begin
    GO
    I am just trying to help --danny rosales
    UML, then code

  • May I use Exception Handling for validation ?

    Hello All,
    Can any one know about that may i use exception handling for validation in my report program.
    Please if its possible then give me some Example...
    Thanks.

    Hi Niraj,
    Exception is not at all raised or handled in the given example.
    There are so many document available in the SCN regarding OO ABAP you can read that.
    As far as validation of a field ( Selection screen ) of course we can do that but I don't see any advantage more over it will make your code unnecessarily complex.
    Regards
    Bikas

  • Exception Handling for many bean objects of a container class in a JSP page

    Hello,
    I have on container bean class. In this container class, there are several others class objects and the getter methods to get these objects out to the JSP pages.
    I have one JSP page which will use different objects in the container class object through the getter methods of the container class.
    My question is how to implement the exception handler for all the objects in the container so that the JSP page can handle all exceptions if occurrs in any object in the container?
    Please give me some suggestions. Thanks
    Tu

    Thanks for your reply.
    Since the container is the accessor class, I have no other super class for this container class, I think I will try the try catch block in the getter methods.

  • Exception handling for ProjectService methods in a new 2006 DI API

    Normally for other objects the Add() method returns error code and calling the GetLastError you get the description.
    AddProject(Project) method of ProjectService returns ProjectParams object.
    So the question is where to get the error code or what is the correct exception handling for that new methods in 2006 SDK.
    Thanks for any help.
    Tomas

    Hi all,
    I have a sceranio :
    I created the text field, text box, com bobox .etc, on new form or exist form.
    When I want to bind data into UDO, i use "DataBind.setBound"
    ex:"oEdit.DataBind.SetBound(True, "@SM_OMOR", "U_Room")"
    Can i bind the data to exist table on B1?
    ex: oEdit.DataBind.setBound(True, "OHEM", "firstName")
    Plz guid !
    Rgds !

  • 2007A: Exception handling for new ProjectService methods

    Normally for other objects the Add() method returns error code and calling the GetLastError you get the description.
    AddProject(Project) method of ProjectService returns ProjectParams object.
    So the question is where to get the error code or what is the correct exception handling for that new methods in 2006 SDK.
    Thanks for any help.
    Tomas

    Hi Thomas,
    For DI API services there is no return code as for the basic objects methods like Add, Update,...
    The only way is then to put try/catch blocks in your code and identify the error message with the Exception.Message property (same mechanism as we have for the UI API). No way to filter them by return code.
    Regards
    Trinidad.

  • Exception Handling for inserts

    Hi,
    My requirement is to populate a table with values got by selecting columns from various table on join conditions. It works fine if all the rows inserted are unique. However if the row to be inserted is duplicate, it violates the uniqueness constraint.
    I want an exception wherein if select query returns 100 rows, of which 80 are already there in the table to be populated, it should just insert the 20 records.
    Below is the SP i wrote for the same. However, as soon as it meets exception condition, it just prints the condition and exits, without processing the rest of the records. Please look at the SP below and suggest a solution.
    create or replace
    PROCEDURE PP_CMC_TEST AS
    cursor c1 is
    (select cdu.subscription_id,max(cdu.account_id),max(s.subscription_versn_start_date),
    max(s.service_plan_id),max(sbp.billing_period_id),sysdate-1
    ,cdu.device_name, cdu.resource_id,sum(cdu.usage),max(cdu.unit_of_measurement)
    from
    subscriptions s, subscription_billing_period sbp, consolidated_daily_usage cdu
    where s.version_end_date is null and
    sysdate-1 between sbp.start_date and sbp.end_date and
    cdu.usage_date between sbp.start_date and sbp.end_date
    and s.subscription_id = cdu.subscription_id
    and sbp.subscription_id = cdu.subscription_id
    and sbp.subscription_id = s.subscription_id
    and s.subscription_versn_start_date=sbp.subscription_versn_start_date
    group by cdu.subscription_id,cdu.device_name, cdu.resource_id);
    a number;
    b number;
    c date;
    d number;
    e number;
    f date;
    g varchar2 (255);
    h number;
    i number;
    j varchar2(60);
    BEGIN
      OPEN c1;
        LOOP
            FETCH c1 INTO a,b,c,d,e,f,g,h,i,j;
             EXIT WHEN c1%NOTFOUND;
    insert into cmc_test
    (subscription_id,account_id,subscription_versn_start_date,service_plan_id,billing_period_id,curr_date,
    device_name,resource_id,usage,unit_of_measurement) values
    (a,b,c,d,e,f,g,h,i,j);
        END LOOP; 
                                 EXCEPTION
        WHEN DUP_VAL_ON_INDEX
          THEN
          DBMS_OUTPUT.PUT_LINE('DUPLICATE RECORD FOUND');
          commit;
        CLOSE c1; 
    END PP_CMC_TEST;Edited by: BluShadow on 07-Feb-2012 09:03
    added {noformat}{noformat} tags (for what it was worth).  Please read {message:id=9360002} and learn to do this yourself in future.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Using SQL you would create an error table and modify the INSERT to log the errors. See the 'Inserting Into a Table with Error Logging' section of http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9014.htm. Note this approach will not work if you are using direct path loads since the log table won't be used.
    If you are going to use PL/SQL for this then what you want is to use BULK COLLECT and then a FORALL with a SAVE EXCEPTIONS clause.
    >
    A. BULK COLLECT INTO plsqlTable LIMIT 5000 - These are your new records you want to INSERT
    B. FORALL ... SAVE EXCEPTIONS - This is the INSERT query to insert the new records
    C. Use a bulk exception handler. Any record in the FORALL that causes an exception will have it's index put into the bulk exception array. In the bulk exception handler you can loop through the array and access the records that caused the error using the index into the plsqlTable and do any error logging you need to do.
    >
    The bulk exception array will have the plsql table index of the row that caused the error. You can index into the plsql table (see Step A above) to access the record and then log it, INSERT it into a duplicates table or whatever you want.
    The important thing is that the records that do not have errors will still get processed. Similar result to what will happen if you use SQL and an error table.

  • Exception handling for Null/Incorrect input parameters

    Hi,
    My BI Publisher report has input parameter name as <region>. It is a text field and is mandatory parameter.
    But if I run the report without giving value to the parameter it gives the error "The report cannot be rendered because of an error, please contact the administrator."
    How can I handle this scenario so that User defined message is displayed, asking user to give correct input.
    I am using Oracle BI Publisher 10.1.3.3.3
    Is there some documentation available for Exception Handling/How to display User defined messages in case of error?
    My requirement is that after displaying the error message (say for example "Please enter Region name"), the report processing should stop there only and it should not display the blank pages of the rest of the PDF template.
    Thanks in advance.

    Hi,
    Thanx for the solution.
    I have another query linked to this issue. My requirement is that after displaying the error message (say for example "Please enter Customer name"), the report processing should stop there only and it should not display the blank pages of the rest of the PDF template.
    Thanx in advance.

  • Exception handling for TEXT_IO

    Hi,
    I am using TEXT_IO package in a report ver 6.0.8.26.0 to generate an extract.
    But, I am unable to handle exceptions like Invalid_Path, Invalid_Mode, Infalid_Filehandle, Invalid_operation, Write_Error, Fclose, etc.
    When I tried to to trap errors using sqlerrm in When-Others-Then, it always gives 302000: non-ORACLE exception.
    Please help.

    Hi,
    I am using TEXT_IO package in a dummy formula field program unit -- function CF_1Formula.
    This formula field returns 1 if execution is successful, means if file is generated and returns 2, in case control goes to exception. I am displaying this formula field on pdf also, so that, by viewing pdf, user can know the status of generation of extracts.
    Everything is working fine. If programs fails, control goes to When-Others-Then exception from there, I am inserting error-message into a table.
    Hence, I want to trap error into appropriate exception, so that specific error-message can be inserted into the table.
    Thanks,
    Ritesh

  • Exception Handling for Array Binding

    Hi
    1)
    I am using a Stored Procedure.
    I am using array binding and if i am sending an array of count 10 to be inserted in a table and only 9 got inserted,i deliberatly inserted one errorneous record in array, the count returned by ExecuteNonQuery() is 10.Why ?
    How can i come to know exact number of rows inserted in table, how can i use Output variables, because the array bind count is 10 so if i add an output parameter it gives error ArrayBind count is wrong....
    2)
    Is it possible to roll back all the inserts if error occurs in any of the insert by Oracle engine.What it does is it inserts all correct records and leaves the errorneous record and doesn't even throw any exception or any message.
    Answer - This can be achieved by using OracleTransaction and don't use Exception handling in procedure otherwise there wont be any exception thrown by procedure which is necessary to detect if an error occured during insert.If you use exception handling OracleEngine will insert correct rows and leave errorneous record and return count of inserted + non inserted records which is wrong.
    Please help.
    Message was edited by:
    user556446
    Message was edited by:
    user556446

    You'll need to encapsulate your validation within it's own block as described below:
    -- this will die on the first exception
    declare
      TYPE T_BADDATA_TEST IS TABLE OF VARCHAR2(1000) INDEX BY binary_integer ;
      tbt T_BADDATA_TEST ;
      aBadTypeFound exception ;
    begin
       tbt(0) := 'a';
       tbt(1) := 'b';
       tbt(2) := 'c';
        for idx in tbt.first..tbt.last loop
          if tbt(idx) =  'b' then
              raise aBadTypeFound ;     
          else
              dbms_output.put_line(tbt(idx));     
          end if  ;
        end loop ;
    end ;--encapsulate the exception area in a begin/end block to handle the exception but continue on
    declare
      TYPE T_BADDATA_TEST IS TABLE OF VARCHAR2(1000) INDEX BY binary_integer ;
      tbt T_BADDATA_TEST ;
      aBadTypeFound exception ;
    begin
       tbt(0) := 'a';
       tbt(1) := 'b';
       tbt(2) := 'c';
        for idx in tbt.first..tbt.last loop
          BEGIN
          if tbt(idx) =  'b' then
              raise aBadTypeFound ;     
          else
              dbms_output.put_line(tbt(idx));     
          end if  ;
          EXCEPTION
            WHEN aBadTypeFound THEN
                dbms_output.put_line(tbt(idx) || ' is bad data');       
            WHEN OTHERS THEN
                dbms_output.put_line('exception');       
          END ;
        end loop ;
    end ;
    output:
    a
    b is bad data
    c
    ***/

  • Exception Handling for OPEN DATA SET and CLOSE DATA SET

    Hi ppl,
    Can you please let me know what are the exceptions that can be handled for open, read, transfer and close data set ?
    Many Thanks.

    HI,
    try this way....
      DO.
        TRY.
        READ DATASET filename INTO datatab.
          CATCH cx_sy_conversion_codepage cx_sy_codepage_converter_init
                cx_sy_file_authority cx_sy_file_io cx_sy_file_open .
        ENDTRY.
    READ DATASET filename INTO datatab.
    End of changes CHRK941728
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          APPEND datatab.
        ENDIF.
      ENDDO.

  • Exception handling for mis-addressed messages

    We are using ebXML messaging in WLI. In many of our workflows we start new conversations with trading partners based on the contents of address fields in the messages. Now and again during development a message comes in which is addressed to a TP who doesn't exist. The message fails to be sent and rolls back repeatedly. Is there a simple way to remove these messages from the WLI hub? Can exception handling be used to move messages which are failing to enter the workflows to a special queue automatically?
    thanks
    Ben

    Hi Holger,
    I will not translate the coding into VB. So if you want to do this it is OK with me.
    An idea would be after some testing by the community to provide the functionality as a DLL. This way it could also easily be added to a VB project.
    However I assume that some developers prefer to integrate the coding themselves so that they might add additional customer specific functionlity.
    For example not to raise an exception if a specific error is in the return parameter because they want to ignore it.
    Best regards,
    Andre

  • Exception handling for Scanner console input

    I'm trying to add exception handling to a Scanner console to deal with exceptions caused by non-numeric input. My idea was to do use a try/catch in a for loop and break if no exception occurs.
    Whats happening is the "iNumber = console.nextInt(); " does nothing on subsequent retries, when an exception occurs. That is, I enter "123w", an InputMismatchException occurs, goes into the first catch block, hits "continue" and goes back into the for loop, hits the "iNumber = console.nextInt(); ", then immediately blows through it without executing. Thus, I hit my max loop count and exit with iNumber = 0.
    I'm thinking I may need to instantiate "static Scanner console = new Scanner(System.in);" again in the event of an exception?
    Thanks for any feedback. I'm brand new at Java and learning as fast as I can :)
    Here is the code:
    class ConsoleInput
         public ConsoleInput() // constructor
         static Scanner console = new Scanner(System.in);
         public int GetInput()
              int iNumber = 0;
              for(int i=0; i<3; i++)
              try
                   System.out.print("Please enter a number: ");
                   iNumber = console.nextInt(); // get console input
                   break;
              catch(java.util.InputMismatchException ex)
                   continue;
              catch(Exception ex)
                   continue;
         return iNumber;
    }

    public class Scratch {
      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        boolean gotAValidInt = false;
        int theInt;
        System.out.println("Enter an int");
        do {
          try {
            theInt = sc.nextInt();
            gotAValidInt = true;
          catch (InputMismatchException exc) {
            System.out.println("Not an int. Try again.");
            sc.next(); // consume the non-int that nextInt couldn't consume
        } while (!gotAValidInt);
    }There are different ways you could structure your loop, but the key is that when nextInt throws an exception, you have to call next() in the catch block to consume the token that nextInt couldn't.
    Edited by: jverd on May 2, 2008 1:52 PM

  • Exception Handling for errors caused by Remote tables

    Hello
    I am trying to run a process that retrieves data from a remote table. Unfortunately occasionally the process fails because I exceed the number of simultaneous sessions allowed for the relevant table. I want to be able to handle this by directing the user to an errors page that I have built.
    Unfortunately I cannot seem to be able to handle the exception. I have included an EXCEPTION WHEN OTHERS section but this does not seem to work.
    Is it possible to handle these sort of errors? If it is possible I want to transfer this process into an asynchronous process so that the query can run in the background.
    Cheers Ian

    The code within my PLSQL DBMS JOB process is;
    declare
    CURSOR curTest IS
    SELECT DISTINCT PREMISE_ID FROM RWN_OOA_IMPORT WHERE PREMISE_ID IS NOT NULL;
    recTest curTest%ROWTYPE;
    l_value NUMBER :=1;
    l_process NUMBER;
    begin
    l_process := GET_CURRENT_PROCESS(1030);
    UPDATE IMPORT_PROCESS SET VOLUME_EXPECTED = (SELECT COUNT(PREMISE_ID) FROM (SELECT DISTINCT PREMISE_ID FROM RWN_OOA_IMPORT WHERE PREMISE_ID IS NOT NULL), PROCESS_STARTED = 1 WHERE PROCESS_ORDER = l_process;
    commit;
    FOR recTest IN curTest
    LOOP
    INSERT INTO CD_IMPORT (PREMISE_ID, LINK_REF, AT_CODE, TABLE_ID)
    (SELECT PRO_NUMBER, LINK_REFERENCE, CD_CPA.AT_CODE, 1 FROM CD_CPA
    WHERE PRO_NUMBER = rectest.PREMISE_ID AND ACCOUNT_NAME IS NOT NULL);
    UPDATE_STATUS(l_process, l_value);
    l_value := l_value + 1;
    END LOOP;
    EXCEPTION
    WHEN err_type.REMOTE_OBJECT_FAILURE THEN
    UPDATE_PROCESS_ERROR(DBMS_UTILITY.FORMAT_ERROR_STACK,l_process);
    WHEN err_type.RECURSIVE_SQL_LEVEL THEN
    UPDATE_PROCESS_ERROR(DBMS_UTILITY.FORMAT_ERROR_STACK,l_process);
    WHEN err_type.SIMULTANEOUS_SESSIONS THEN
    UPDATE_PROCESS_ERROR(DBMS_UTILITY.FORMAT_ERROR_STACK,l_process);
    WHEN err_type.PRECEDING_ERROR THEN
    UPDATE_PROCESS_ERROR(DBMS_UTILITY.FORMAT_ERROR_STACK,l_process);
    WHEN OTHERS THEN
    UPDATE_PROCESS_ERROR('Unhandled Error message' ,l_process);
    end;
    The table CD_CPA is the synonym to the DBlink table. The other processes used in this process is the UPDATE_PROCESS_ERROR shown below;
    create or replace procedure "UPDATE_PROCESS_ERROR"
    (in_error IN VARCHAR2, in_process_id IN NUMBER)
    is
    begin
    EXECUTE IMMEDIATE 'UPDATE IMPORT_PROCESS SET ERROR_MESSAGE = ' || chr(39) || in_error || chr(39) || ', ERROR = 1 WHERE PROCESS_ORDER = ' || in_process_id;
    commit;
    end;
    There is also the package err_type which holds the 4 error messages I get when I run or compile this process;
    create or replace PACKAGE err_type
    IS
    REMOTE_OBJECT_FAILURE EXCEPTION;
    PRAGMA EXCEPTION_INIT(REMOTE_OBJECT_FAILURE,-4052);
    RECURSIVE_SQL_LEVEL EXCEPTION;
    PRAGMA EXCEPTION_INIT(RECURSIVE_SQL_LEVEL,-604);
    SIMULTANEOUS_SESSIONS EXCEPTION;
    PRAGMA EXCEPTION_INIT(SIMULTANEOUS_SESSIONS,-2391);
    PRECEDING_ERROR EXCEPTION;
    PRAGMA EXCEPTION_INIT(PRECEDING_ERROR,-2063);
    end err_type;
    Hope this helps.

  • Exception handling for eventlistener inner classes in swing application

    Hi,
    This is probably sooo easy I will kick myself when I find out, but anyway here goes...
    I have an inner class thus...
              cmbOffence.addFocusListener(new FocusAdapter() {
                        public void focusGained(FocusEvent e) {
                             cmbOffence_focusGained(e);
                        public void focusLost(FocusEvent e) {
                        try {
                             cmbOffence_focusLost(e);
                        } catch (XMLConfigurationException xce) {
                   });where cmbOffence.focusLost(e) is looking up to a class that throws an exception which should be fatal i.e. the swing app should close. I want to handle this exception gracefully so therefore want to throw the XMLConfiguratinException to the main application class. How do I do this?? I guess this is more of an inner classes question than a swing one per se, but any help would be appreciated.
    Thanks
    Conrad

    I think you're maybe confusing classes and threads. In the typical Swing application the "main" thread finishes after openning the initial window and there really is no main thread to report back to. In fact the dispatcher thread is about as "main" as they come.
    To exit such a program gracefully is usually a matter of cleaning up resources and calling dispose on the main window, which you can perfectly well do from the dispatcher thread.
    I usually wind up with some centralised method to deal with unexpected exceptions, for example as part of my desk top window in an MDI, but it's called from the dispatcher thread as often as from anywhere.

Maybe you are looking for

  • Error while configuring CCMS Agent

    Hello Gurus, I am trying to install CCMS agent on our BI Dev system, but it gives me below error. Error Message - ERROR: Cannot open Monitoring Segment 0 rtc = 245 Last reported error: [249]  CCMS monitoring segment has wrong EYE CATCH: CCMS mo nitor

  • Using my MacBook with an external monitor

    Hi, I'm currently using my MacBook (Intel Core 2 Duo ,2.4 GHz, Memory: 4 GB, GMA X3100) with an external 19" Dell monitor and I was thinking to buy a 22" but then I started wondering if this computer would handle a 22" monitor. Will this MacBook hand

  • Shared Photo Streams - Some Pictures Will Just Not Share

    I am using Aperture to create Shared Photo Streams. I have created 20 or so Shared Photo Streams, many of which work as advertised. But I have a couple of situations where certain photos just refuse to get shared in to any Shared Photo Stream. I disc

  • Movie to large to download

    I purchased a TV Show form itumes and when I went to download it, it took forever. We are talking days! I wrote to itunes and got the standard line. I called my ISP to find out that I have a what is called "FAP" Fair Access Policy. I can download up

  • Making table cells non-focusable

    I have a JTable in which some of the cells should never receive the keyboard focus. I want the TAB key to skip over these non-editable cells, but I'm having trouble. I've tried using a cell renderer where getTableCellRendererComponent calls setFocusa