Error handling routines....

Each,
Have started working on an application which is a couple of years old. Has a 9i backend and currently 6i front end but will be moving to 9i or higher.
It has no built in error handling so am wanting to introduce this without causing too much disruption. Am not wanting to have to change all the calling parameters to the packages.
Am considering creating an error package with private variables to hold any errors raised and using a function which can be called from the client to check for any errors after calls to the server. What do people think about this approach?
Am thinking this would be OK for the user facing part of the app but for batch jobs would need a different approach like storing details away in an error log table.
Any pointers and clues as to what way i should be going?
Thanks In Advance

Hi,
a possible solution for your problem is
-- define your functions and procedures WITH EXCEPTION HANDLING
throwing EXCEPTIONS f.e. with own defined Error-Codes
now your client can handle the exceptions you throw
-- for your batch-jobs you can define "facades"(like FACADE-Pattern) for the
functions, procedures which handle the exceptions throws by the
functions and log the information f.e. in a table.
Hope that helps
Regards
Schoeib

Similar Messages

  • Error Handling Routine

    Hi Experts,
    Can anyone provide me the error handling routine (package/procedure)? or any link?
    At present I am just using the Raise_Application_Error and then handling it in When Others exception clause. But now I need some kind of mechanism which captures all my errors and then send the errors to front end (HTML/Jscript).
    Your help would be appreciated.
    Thanks,
    Ba
    London

    Remove the WHEN OTHERS clause. The exception will be propagated back to your front-end, as God* intended.
    *Larry.                                                                                                                                                                                                                                       

  • Equivalent for IBM specific Error handling routines

    Hi,
    There is a couple of IBM specific error handling routines - AFHCEEN (CEE3SPM) and XUFLOW in our FORTRAN source code which suppresses the overflow and underflow exceptions. Is there any equivalent of these routines available in SUN Solaris O/S ?

    Yes, there are two ways to do it. First, if you simply want to suppress those exceptions throughout the code you can compile with -ftrap=%none.
    If you need to be able to turn off those exceptions temporarily, then you can use the IEEE_EXCEPTIONS module, which is part of the Fortran standard (and thus ought to be portable). Here is an example:
    use ieee_exceptions
    real x
    integer status
    logical m
    call get_command_argument(1, status=status)
    if (status .eq. 0) then
       print *, 'Enabling signals'
       m = .true.
    else
       print *, 'Disabling signals'
       m = .false.
    end if
    call ieee_set_halting_mode((/ ieee_overflow, ieee_underflow, ieee_inexact /), m)
    x = 0.1
    do while (x .ne. 0.0)
       x = x / 2.0
    end do
    endYou should be aware, though, that the standard requires the halting mode to be saved on entry to a procedure and restored on exit. Therefore, you cannot write a subroutine whose purpose is to change the halting mode in the procedure that calls it.

  • General purpose Error Handler Routines

    While developing various applications we found out that error handling is one of the most important(at the same time one of the most ignored) task. so we decided to develop some modules which will allow us to configure the handling methods
    after develoment we think that this library can be useful to everyone, hence we are making it public
    please feel free to give your feedback, bug report, improvement ideas etc...
    you can also mail me at [email protected]
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog
    Attachments:
    Error Handler.zip ‏367 KB

    Hello Tushar,
    Thanks for sharing your work on the forum. We really appreciate it.
    Regards,
    Chetan K
    Application Engineer
    National Instruments

  • Error Handling in Mediation for sequential Invocation in Routing rules

    Hi all,
    I have a situation File Adapter->Mediator->BPEL Process 1->BPEL Process 2.When an error occurs in BPEL Process 1 a soap fault is returned to the mediator service.
    Now since the mediator service invokes BPEL process 1 synchronously hence the fault policy is by-passed and the error is returned to the file adapter(the caller).
    I have configured rejection handling in the fault-policy file as below -
    _+<faultName xmlns:rjm="http://schemas.oracle.com/sca/rejectedmessages" name="rjm:pollFlatFiles">+_
    _+<condition>+_
    _+<action ref="ora-ws"/>+_
    _+</condition>+_
    _+</faultName>+_
    _+<service faultPolicy="RejectionMessageHandlerPolicy">+_
    _+<name>pollFlatFiles</name>+_
    _+</service>+_
    The following scenario occurs when trying to test the error handling -
    1.First when the error occurs in BPEL processes 'oracle.fabric.common.BusinessFaultException' is thrown at the composite level and no message is rejected by the file adapter.
    2.Immediately when the errors occurs for a second time the messages gets rejected and my rejection handler is called since the following exception is thrown from the file adapter -
    The adapter has exceeded maximum configured retries. The adapter was unable to process "{0}" after having retried for {1} times, now the adapter will reject the message. This exception usually comes due to errors in downstream systems. Please increase the value for "jca.retry.maxRetries" in composite.xml for the inbound service and redeploy.
    I have tried increasing the retry count also in composite.xml but the same sequence occurs i.e-
    First time business exception.
    Next time message rejection.
    Any idea how the error can be properly handled in synchronous invocation to avoid this situation so that the messages always get rejected?
    I am using SOA Suite 11.1.1.2.0 version.
    Thanks and Regards,
    Mandrita.

    Hi samay,
    In the transfer rules, if returncode is not 0, the upload stop,so..
    Actually I delete the "wrong" data in the start routine of the transfer rules

  • Error Handling and Freeing-up Memory

    I'm trying to write my java programs as responsibly as possible. When an exception is caught and sent to my catch block, in order to properly free up memory do I need to set all objects (created prior to the error occurance in the try block) to null or does Java do this for me at the termination of the routine or thread? I used to do this in VB within my error handlers. For example, in VB, if I had created an XYZ object and an error occured later on, before I was done using object XYZ, as part of my error handler I would "Set XYZ = Nothing". Is something similar needed in Java?

    Well it is always good to do a clean up routine you can do this by makeing a method that will set things to null and such and you also can use finally after the exception handler has exit and close streams and such in the finally {} catch also you can forcing finalization and carbage collection
    here is a link for that
    http://java.sun.com/docs/books/tutorial/essential/system/garbage.html
    but I thank it is alway good programming practice to clean up after your self
    ps I hope this helps

  • General QUestion about error handling

    Hello,
       I am writing my own VI's to communicate with my hardware. Each one of the VI's incorporate numerous error checking routines to detect if the desired operation completed correctly. If error(s) are detected with a VI, the "Bundle by Name" VI is used to update the Natiinal Instruments error cluster with the appropriate info each time a error occurs.
      What I am finding is that the VI error cluster contains the last error found, instead of the first error found. Please be aware that I am assuming (we know what that stands for) is that the National Instruments error cluster is accumulative, so if I add four errors to the cluster, then the error cluster contains at least four errors.
      So how do I find the first error that was entered into the error cluster. I have found a vi called "Find First Error:, but I am confused (as usual) on how to get what I want. So I am asking for "divine guidance" or a kick in behind from the Labview wizards on how to correctly handle errors.
     Regards,
    Kaspar
    Regards,
    Kaspar

    The cluster is a standard cluster and is not accumulative.
    Usually, the way to handle this is to check the error in terminal and if it is has an error to pass the error instead of executing the code. That way, when you have an error, the rest of the code does not execute. Here's an example:
    If you want to merge the error numbers, search the forums for Mike Porter's error stacker.
    Try to take over the world!

  • Error handling in Transfer rules

    Hi All,
    I have a small code for material mappnig (EAN to SAP) in my transfer rules. If mapping does not exist then I am writting Error message(Type E) in error table G_T_ERRORLOG and setting up value of Returncode to 1.
    Also I have done the Error Handling in Infopackage to 1000 Records and selected the radio button "Valid records update, reporting possible(request green)".
    Now say I am uploading 5000 records. In that 500 are without mapping.
    So, in ideal case system should update request with 4500 records in data target(with status Green) and also create another request with those 500 records(with status Red). In my case it is creating the new request but with zero records and also the request with 4500 records are showing status red, though 4500 records are getting updated in ODS.
    But when I do the same validation in Update rules it all works fine. The only difference in coding is, in transfer rules error table is G_T_ERRORLOG and in update rules it is MONITOR.
    Any help....
    Thanks & Regards,
    Samay Mehta

    Hi samay,
    In the transfer rules, if returncode is not 0, the upload stop,so..
    Actually I delete the "wrong" data in the start routine of the transfer rules

  • Understanding how Error handling works in transformation

    Hi Experts,
    I am trying to achieve error handling in Start and End Routine by writing the error log to the monitor and also raising the exception in case a match is not found.
    I understand the code below achieves what I am looking for, but I want to know how this works
      if sy-subrc ne 0.
            monitor_rec-msgid = 'BI'.
            monitor_rec-msgty = 'E'.
            monitor_rec-msgno = '001'.
            monitor_rec-msgv1 = 'No entry for ZTYPE in source '.
            monitor_rec-msgv2 =  .
            append monitor_rec to MONITOR.
            raise exception type CX_RSROUT_ABORT.
          endif.
    Can someone please explain how the above code works?
    I am not sure how these messages get written to the monitor and how to check these error records. Also if a load is scheduled in the process chains, does the DTP error log show the exception CX_RSROUT_ABORT?

    proper exception handling is one of the most important thing to consider in your pl/sql code.
    One basic principle is to trap/handle only those exceptions that you expect. In general this means you should NOT use the when other execption (only at the outermost call structure)
    I guess this is oracle FORMS pl/sql, so we have to be careful with some assupmtions.
    But this should work. See also how indenting the ode helps to improve readability. Here in the forum you need to use {<b></b>code} tages before and after your code to preserve indention and to enable basic highlighting
    untested
    /* fetch the primary account */
    begin
       select customer_code into cust from primary_account where pc.customer_code=:import_can.consignee_code;
    exception
       when no_data_found then
          j:='Customer ('||:import_can.consignee_code||') not found. Account is not created for this consignee ';
          raise_application_error(-20001,j); /* might be raise form_trigger_error here or something like that */
       when too_many_rows then
          j:='Customer ('||:import_can.consignee_code||') has several Accounts!';
          raise_application_error(-20001,j);
    end;
    begin
         select customer_code into cust from cust_details where customer_code=:import_can.consignee_code;
    exception
        when no_data_found then
            h:='consignee_code is not exist in customer code';
           raise_application_error(-20001,h);
    end;
    COMMIT_FORM;
    :GLOBAL.ADDCAN:=0;
    SA:=SHOW_ALERT('SAVE');
    ENAB;

  • How to take control back from service error handler in osb

    I am using osb to send data to multiple services at the same time.since x query is a procedural language if any single operation fails the flow goes to service error handler which calls a BPEL webservice and logs the error in a database but the control doesnt comes back to my code I have tried everything including RESUME,REPLY operations but all in vain similarly i cannot use service callout call to my business service because its not allowing to select my BPEL wsdl operation

    If your statement "the control doesnt comes back to my code" means you expect that your xquery will continue in processing than your expectations are just too high. :-)
    Resume action is supposed to resume the next action in the message flow. It means the action that follows the action which caused an error.

  • Start Routine: Syntax error in routine 2LIS_03_BF Transformations

    Hi experts,
    I enhanced the 2lis_03_bf data source, and replicated the data source in bw system, i have mapped the transformations and when i try to activate the transformations it is giving the below error.
    Start Routine: Syntax error in routine
    when i check the start routine it is giving the  below error message.
    E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
    "SOURCE_PACKAGE" is incompatible with the formal parameter
    "DATA_PACKAGE".
    please provide me the solution.
    Regards
    venuscm

    Hi Venu,
    This seems to me like you have earlier migrated the update rules to transformations. We did the same earlier and faced issues whenever we add new fields/infoobjects. The error message was different, if i remember correctly.
    We had to add the new field/infoobject added, to the structure '_ty_s_*****' that exists at the top of the start routine code. This was one disadvantage of migration of rules.

  • Report and Alert don't executed in the error handler with a JMS proxy service

    Hi,
    I'm working with OSB 11.1.1.4.0 and I'm facing a problem with the error handler of my JMS proxy service.
    My error handler contains two main elements :
    - a Report action
    - an Alert with a JMS destination defined
    When the business service failed the message remain in the queue. It's the expected behavior.
    The problem is :
    - the report is missing
    - the alert is raised but missing in the JMS destination defined in the Alert setting.
    I've noticed if I add a Reply with Failure or Success, Report and Alert are successfully executed.
    Unfortunately the message don't remain in the JMS queue.
    What can I do in order to have my report/alert done and the JMS transaction rollback in order to keep the message in the queue ?
    I've already met this problem in the past with alsb v3 and my solution was to add Service Callout in the error handler in order to externalize these actions.
    This solution is not convenient and I hope another solution is possible.

    Inventorying workgroups can be difficult, especially when it comes to remote access and network security. Because workgroups are not centrally managed, some of the items discussed in this
    wiki article on preparing your workgroup environment may require you to visit each machine individually.
    For non-domain credentials, you do not use the <systemname>\<user> format, you simply enter the user name. Regarding how to enter the credentials, if you have an account that uses the same username and password on all machines and is an administrator
    on all of those machines, then you can enter that in the All computers credentials page of the wizard. You can also do this if they are different user names. However, if some machines have an account with the same user name, such as Administrator,
    but different passwords on each machine, you will need to use the Manually enter computer names discovery method, and then enter the information for each group or each machine.
    As you can tell, workgroup environments can quickly negate any benefit that the agentless inventory nature of MAP provides.
    Please remember to click "Mark as Answer" on the post that helps you, and to click
    "Unmark as Answer" if a marked post does not actually answer your question. Please
    VOTE as HELPFUL if the post helps you. This can be beneficial to other community members reading the thread.

  • LV7.1 Strange behavior with Automatic Error Handling occuring when it shouldn't [LV 7.1 Pro on WinXP for Tablet PC's]

    [LV 7.1 Pro on WinXP for Tablet PC's]
    I recently let a rather large LV app of mine run in the development environment while I was out for a couple of days. Upon returning I found that the app had hung for ~22 hours waiting for an answer to an Automatic Error Handling (AEH) dialog proclaiming an Error 7 in New File without any indication of the VI hierarchy that called New File.  I set about ensuring that AEH dialogs would not pop up and have not been able to discover how I could have possibly received one in the first place.
    Subsequent investigation revealed:
    Neither AEH option in Options>Block Diagrams were checked.
    Network problems had occurred around the time that the app had hung.  All file paths are network paths when running in the development environment, so the cause of the error was most likely valid, even if the AEH dialog appearance wasn't.
    My app has only one instance where the New File primitive is used by me. That subVI and all others above it in the hierarchy DO NOT have the AEH property enabled.  The error out cluster of New File in my subvi is wired.
    My app has three instances where New File is called from a vi.lib vi (Open/Create/Replace File.vi, Open Config Data.vi, and Prompt Web Browser Path.vi), none of which have the AEH property enabled.  Nor does any of their calling VI's.  All three instances also have their error out cluster wired.
    A utility to examine the AEH property of all VI's (with all top level and dynamic VI's loaded) in memory reported that only 1 of 308 vi's ( RGT Does File Exists.vi from the Report Generation Toolkit) had that property true.  That vi has no subVI's other than the File/Directory Info primitive and no calling VI's in common with any of the vi's that call New File, except a top level VI.
    As long as 'Enable automatic error handling dialogs' remains unselected in options>block diagram, I am unable to get an AEH dialog for either the New File or File/Directory Info primitives in a test VI with AEH property enabled and their error out clusters unwired no matter what invalid path I pass to the functions.  As soon as the options>block diagram>Enable AEH dialogs' is selected, both primitives fire AEH dialogs with no error out wired and don't when wired. i.e. works as advertised.
    In other words I can find no reason why I should have gotten the problem AEH dialog...
    I cannot afford for this app to hang because of a network problem, other portions of the app that were running concurrently correctly handled the error and, had the AEH dialog not appeared, the app would have made corrections or shutdown in an orderly fashion.
    Any ideas?

    Very good.
    Write Characters to File.vi>Open/Create/Replace File.vi>New File
    New File throws the error.  Open/Create/Replace strips the hierarchy from the source of the error.  Write Characters passes it to the General Error Handler.  I never looked above O/C/R file in the hierarchy except for enable automatic error handling property.  The tip-off should have been to realize that O/C/R file was stripping the hierarchy from the error and look above that. 
    The real irony is that Write Characters was being used to log error cluster data to an error log file...
    Save as... Copy without updating... the OEM 'Write Characters to File' is gone from this app.
    Thanx (a bunch)

  • Syntax error in routine

    Hi Gurus,
        I have added new fields in ODS  and Cube.While activating transformation I am getting the following error : 'Start routine:Syntax error in routine'Please let me know how to trouble shoot the same.
    Regards
    Hasini

    Hi Pallavi,
    Pls gothroug the Routine:
    MONITOR_RECNO.
    Runtime attributs
        SOURCE_SYSTEM  = p_r_request->get_logsys( ).
    Migrated update rule call
      Perform routine_9998
      TABLES
        SOURCE_PACKAGE
      CHANGING
        l_abort.
    *-- Convert Messages in Transformation format
        LOOP AT MONITOR_RECNO INTO ls_monitor_recno.
          move-CORRESPONDING ls_monitor_recno to MONITOR_REC.
          append monitor_rec to MONITOR.
        ENDLOOP.
        LOOP AT MONITOR INTO ls_monitor.
          move-CORRESPONDING ls_monitor to MONITOR_REC.
          append monitor_rec to MONITOR.
        ENDLOOP.
        IF l_abort <> 0.
          RAISE EXCEPTION TYPE CX_RSROUT_ABORT.
        ENDIF.
    $$ end of routine - insert your code only before this line         -
      ENDMETHOD.                    "start_routine
          Method inverse_start_routine
    E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
    SOURCE_PACKAGE" is incompatible with the formal parameter
    "DATA_PACKAGE".
    Regards
    Hasini

  • Syntax Error in Routine while Activating Transformation

    Dear All,
    I am activating whole scenario for 0SD_C03. we have made transformation for 2lis_11_vaitm, during installation we get below errors:
    - Rule (target: 0SUBTOT_1S, group: 01 Standard Group): Syntax error in routine
    -Rule (target: 0NET_VAL_S, group: 01 Standard Group): Syntax error in routine
    -Rule (target: 0PROD_CATEG, group: 01 Standard Group): Syntax error in routine
    I really appreciate your any input for this.
    Thanks & Regards,
    Darshan

    Hi,
    I hope there is inbalance in between SOURCE Datapackage and Target Datapackage. So in the start routines pls check it and it not found then add in DATA_PACKAGE...
    Check with ABAPer
    under ,
    TYPES:
          BEGIN OF tys_TG_1_full,
            SUBTOT_1S           TYPE /BI0/OISUBTOT_1S,
    and also you can fin dsimilar kind of threads in SDN.
    Re: Syntax Error in Routine while Activating Transformation
    Re: Issue while creating Transformation from Update rule.
    Re: 0IC_C03 activation of Transformation rule ends with ERROR
    Re: Error in activation of transformation
    Thanks
    Reddy

Maybe you are looking for