Best practices for managing exceptions and success messages.

Hey people,

These days I've been shooting packages to clean my application. And question came to my mind, ' should I treat my exceptions the right way?


So I want to ask you met guys, what is the best practice for this? (I want to learn it until it's too late )

Currently I have a function that returns "OK" if all goes well.


return('OK');  

Can I manage my exceptions like this

  EXCEPTION
    WHEN OTHERS THEN
      ROLLBACK;
      RETURN (SQLERRM);

At THE SUMMIT, I have a process that calls the function and then checks if the function returned "OK".

     IF cRet not LIKE 'OK%' THEN
      RAISE_APPLICATION_ERROR(-20000,cRet);
     END IF;

And in 'process Error Message' I put "#SQLERRM_TEXT #" so that I can see what error occurred.

Question aside, how do you manage your messages of success?

Currently in 'process success Message' put something along the lines "Action completed successfully". What to do about all the processes.

Do you want to do differently?

I really want to hear what you have to say since I'm tired of feeling like this is a terrible way to manage these things.

Hi Para,

Para wrote:

I don't know of situations where my service throw exceptions like no_data_found.

and I need to know that the process is not so I can get to see my # #SQLERRM_TEXT.

I got this by increasing the error in the application (which I think is a bad way to go) if the return is anything other than 'OK '. I get my application error in the process of the apex, and not in my service.
And I want to show the inline error in the notification. (Which I am currently with my approach).

You can use APEX_ERROR. ADD_ERROR in your PL/SQL process to throw exceptions in Oracle APEX.

Reference: Re: Re: error in the processing of the page management

Kind regards

Kiran

Tags: Database

Similar Questions

  • Best practices for managing strategies of path

    Hello

    I get conflicting advice on best practices for managed paths.

    We are on version 4.0 of ESXi connection to a HP EVA8000. Best practices guide HP recommends setting the strategy of railways handle on Round Robin.

    This seems to give two active paths to the optimized controller. See: http://h20195.www2.hp.com/v2/GetPDF.aspx/4AA1-2185ENW.pdf

    We used certain consultants and they say that the best practices of Vmware for this solution is to use the MRU policy which translates a single path to the optimized controller.

    So, any idea what good practice is best practice? Does make a difference?

    TIA

    Rob.

    Always go with the recommendation of the storage provider.  VMware recommendation is based on the characteristics of the generic array (controller, capable ALUA failover methods, etc.).  The storage provider's recommendation is based on their performance and compatibility testing.  You may want to review their recommendations carefully, however, to ensure that each point is what you want.

    With the 8000, I ran with Round-Robin.  This is the option of creating more robust paths available to you from a failover and performance point of view and can provide performance more even through the ports on the storage controller.

    While I did of the specific tests/validation, the last time that I looked at the docs, the configuration of HP recommends that you configure each IO to the ports in the switch configuration.  This adds the charge to the ESX host, the switch to other ports, but HP claims that their tests showed that it is the optimal configuration.  It was the only parameter I wondered in their recommendation.

    If you haven't done so already, be sure to download the HP doc on configuring ESX and EVA bays.  There are several parameters that you must configure the policy path, as well as a few scripts to help make the changes.

    Virtualization of happy!

    JP

    Please consider awarding points to useful or appropriate responses.

  • Request for advice: generally speaking, what is the best practice for managing a paid and a free application?

    Hi all

    I recently finished my first app of cascades, and now I want to inspire of having a more feature rich application that I can then sell for a reasonable price. However, my question is how to manage the code base for both applications. Any have any "best practices", I would like to know your opinion.

    You use a revision control system? This should be a prerequisite...

    How the different versions of the application will be?

    Generally if you have two versions that differ only in terms of having a handful of features disabled in the free version, you must use exactly the same code base. You could even just it for packaging (build command) was the only difference, for example by adding an environment variable in one of them that would be checked at startup to turn paid options.

  • What is a best practice for objects created and literals

    If I have to run a method several times, is it better to do this:
    int i = 0;
    public void test(){
         i = rand.nextInt();
         System.out.println(i);
    } 
    Or is it better to do:
    public void test(){
         int i = 0;
         i = rand.nextInt()
         System.out.println(i);
    }
    Assuming that the variable 'i' will NOT again the program, considering that I have will take place probably this method a hundred times or more, I just want to know which is faster or better.

    And if it was an object rather than a literal? -What changes it?

    What happens if the method is static? -What changes it?

    It is best to declare variables in the lowest scope possible. So, given the choice between these two pieces of code and other assumptions you mention, the second part of the code is better.

    (By the way the rule is true because it makes your code easier to understand. In the second part of the code you posted, it is obvious that variable 'i' isn't used everywhere except in the "test" method In the first part of the code, the reader cannot tell. Less the player should reflect the code you write, the better code.)

    However if the second part of the code is what you want, then it is too long. Why you initialize the variable to zero, and then in the next line assign another value to it? Why not simply initialize this another value in the first place?

    It's a line too.

    Then, if you are going to assign a value to a variable and then print the value of this variable, why not just print the value directly? Why have the variable at all?

    This is so two lines too.

    It is usually best to write less code, and no more code. Most code you write more code must contain errors. Beginners used to write a lot too much code. However, it is possible to go overboard with the idea of writing less code; It is possible to write a long and unreadable 'one-liners', which do the work, but when some other poor decoration needs to change to something else, it's impossible.

    You will notice that I have not address the issue of the "faster" at all. This is because that things like when you declare variables are a triviality in terms of speed things run.

  • Best practices for the CFC and CFFUNCTION

    I'm curious as to what must be the best place for cffunctions.  Be in the Application.cfc file if they need to be called from various locations throughout a site.

    Or is it a better idea to put the cffunctions on one page and use cfinclude to put the page in pages where functions can be used?

    Or is there a better way to deal with them?

    I have a bunch of small savers of time code

    You can still use an inclusion, of course. You should think about CFC when certain functions share themes in common, when functions become complex, or when the number of functions becomes important.

    Maybe they should all go in a CFC as UDF. CFC.

    Yes, they could go on a CFC, but not necessarily all in a CFC. You should consolidate functions only if they express the behavior of a particular concept. For example, you could do functions that manipulate strings, such as getRandomString, part of StringManipulation.cfc.

    I think I can call one of the several functions in a CFC.

    You can call any number of functions a CFM page or function in an another CFC.

    I did not understand if a CFC is a process, or can be a collection of processes.

    A function through an instance of a component call, as follows, is a process


    However, there are ways to create two or more of these processes to run at the same time.

    I'm not too clear on where put it while it is accessible by all pages of a site.

    As Dan said, you can put inside or outside of the wwwroot folder. The important thing is to distribute your FSTC and CFC in folders so that your application will have a logical, easy to follow structure.

  • Advice on best practices for managing analysis listener logs and logs of the list

    Hi friends,

    I just started a job as a dba CARS for some big 24 * 7 systems administrator, I've never worked with RAC and clusterware.

    2 space issues

    (1) very large listener_scan2.log in the folder /u01/11.2.0/grid/log/diag/tnslsnr/ < servername >/listener_scan2/trace
    (2) bunch of files log_nnn.xml /u01/11.2.0/grid/log/diag/tnslsnr/ < servername >/listener_scan2/alert folder (4 GB out of stock)

    Welcome advice on how best to manage these short-term (i.e. remove manually) and recommended practice and the safest way (adri maybe not sure how it works with listeners to scan)

    Welcome advice and commands that could be used in these cleaning and a robust mechanism in place for the management of the log file in RAC and CLusterware systems safely.


    Finally should I check the log files in /u01/11.2.0/grid/log/diag/tnslsnr/ < servername >/listener_scan2/alert regulalrly?
    My experience with newspapers in the listener, is that they are only considered when there are major problems of connectivity and overall are ignored.

    Thanks for your help,
    Cheers, Rob

    Have you had problems in need for the purpose of investigation? If this is not the case, just remove them. Are the logs required for some sort of verification process? If so, gzip to a place where you can use your operating system from tape backup strategies to preserve their n-days. Once you delete a file active, he must recreate the file and continue without interruption.

  • What is the best practice for managing for results in doubles because of several sessions

    I work with PowerCLI 5.0.  I quite often find that I have a few sessions open at the same time connected to a server that hosts a particular virtual machine and vCenter.  I ran into a problem when I tried the cmdlet Add-USBController of VMware vSphere PowerCLI Reference book.

    The following lines are (roughly) in the extract cmdlet of the book:

    $vmView get - vm 'test ' | Get-View

    $vmView.ReconfigVM_Task ($spec)

    I got the following error "method call failed because [System.Object []] contains a method named"ReconfigVM_Task"" etc.

    It turns out that I was getting an array of vmViews for 'test' (instead of one), because I had a connection to the host and vCenter.  Once I deleted the host sessions, the script worked well.

    So now my question - what is the best way to mitigate this in my scripts? At least, I guess I need to make sure that I received only an object in the view of the GET. should I remove all duplicates? kill all other sessions when I run the script?

    Thank you

    Maureen

    The best method is to use the server parameter on cmdlets where it is available, in this way, you can limit the objects returned to this server for vSphere.

    If you have multiple sessions on the same server from vSphere open, you could direct the result of a Select-Object cmdlet.

    Like this

    Get-VM-name MyVM-Server $vcenter | Select - 1 first

  • Best practices for deferred loading collection once but ensuring there?

    I'm confused on best practices for managing the "setup" of the form, where I need a remote call to occur once only once for the form, but I also need to make use of this collection for a combobox that will change when different lines in the DataGrid or clicked. Easier if I just explain...

    1. You click on a row in a datagrid control to modify an object (for this example we will say it is an "employee")
    2. The form you go must have a collection of objects 'Department' charged by a remote call. This collection of departments should only occur once, since it is not common for them to change. The departments collection is used to fill a combobox in form.
    3. You need to understand what Department of the comboBox control is the property selectedIndex by iterating over the departments and find one that fits the employee.department.id

    Individually, I know how I can do all of the above, but because of the asynchronous nature of Flex, I'm having hard time setting up things. Here are a few questions...

    My first thought was just put the loading of the departments in an init() method on the employeeForm who would load as an event on the form creationComplete(). On the component page grid when the event handler by clicking a line of fire, I then calls the setup() method on my employeeForm which stands at which selectedIndex to set to the combobox control looking at the departments.

    The problem is the resultHandler for the load of the departments could not returned (so departments could not be there when "setUp" is called), but I can't put my business logic to determine the correct combobox in the departmentResultHandler because it would mean that I would always have whenever I don't want the fire of the call to the remote server object.

    I have to miss a single best practice? Suggestions welcome.

    Hi there rickcr

    It is pretty rough and you need to make a few storage upward, but take a look below.


    http://www.Adobe.com/2006/mxml"layout ="absolute">
       
            Import mx.controls.Alert;
    Import mx.collections.ArrayCollection;
               
    private var comboData:ArrayCollection;
               
    private void Setup (): void {}
    If {(comboData)
    Alert.Show ("data are present")
    populateForm()
    } else {}
    Alert.Show ("data not '")
    getData();
    }
    }
               
    private void getData (): void {}
    comboData = new ArrayCollection();
    The result of this call, the installer again
    }
               
    private function populateForm (): void {}
    fill out your form
    }
    ]]>
       

       
       
           
           

           
           

       

    I think this example type of watch you want.  When you first click on tab 2 there is no data.  When you click on tab 2 once again, there is. The data for your combo will be stored in comboData.  When the component gets created first the comboData is not instansiated, just romance.  This allows you to say

    If (comboData)

    This means that if the variable contains your data, you can fill out the form.  Initially it is not so now the else condition, you can call your data and return the result of your data then you can say

    comboData = new ArrayCollection(), put the data in it and remember the installation again.  This time comboData is populayed and is so it will run the method populate the form and you can decide which selected item to affect.

    If it is on a large scale you want to look into the creation of a suitable handler class to handle this, but this simple demo shows you can test to see if the data is different.

    Hope it helps and gives you some ideas.

    Andrew

  • Best practices for dealing with Exceptions on members of storage

    We recently encountered a problem where one of our DistributedCaches was closing himself and restart due to a RuntimeException is thrown from our code (see below). As usual, it's our own code and we have updated to not throw a RuntimeException in all circumstances.

    I would like to know if there are some best practices for Exception handling, other than catching Exceptions and their record. We should always catch the Exceptions and ensure that they do not spread back to code that is running from the pot of consistency? Is it possible to configure consistency so that our DistributedCaches are not completed even when filters custom and other throw RuntimeExceptions?


    Thank you, Aidan


    Exception below:

    2010-02-09 12:40:39.222/88477.977 Oracle coherence GE < error > 3.4.2/411 (thread = DistributedCache:StyleCache, Member = 48): a (java.lang.RuntimeException) exception occurred reading Message AggregateFilterRequest Type = 31 for Service = DistributedCache {Name = StyleCache, State = (SERVICE_STARTED), LocalStorage = active, PartitionCount = 1021, BackupCount = 1, AssignedPartitions = 201, 204 = BackupPartitions}
    2010-02-09 12:40:39.222/88477.977 Oracle coherence GE < error > 3.4.2/411 (thread = DistributedCache:StyleCache, Member = 48): DistributedCache ending because of an exception not handled: java.lang.RuntimeException

    We have reproduced you problem in the House and it looks like a global filtering does not
    the correct thing (i.e. having caught a processed) when moving from a runtime exception.
    In general runtime exceptions should simply be exploited and returned to the application
    without compromising the cache server, so we will be solving it.

  • I would like to know the "best practices" for unplugging my computer permanently to the internet and other updates.

    Thank you for taking the time to read this. I would like to know the "best practices" for unplugging my computer permanently to the internet and other updates. I thought I would do a clean install of Windows XP, install my Microsoft Works again and nothing else. I would like to effectively transforming my computer into a word processor. He continues more and more slow. I get blue screen errors, once again. I received excellent Microsoft Support when it happened before, but since my computer is around 13 years, I think it is not worth the headache to try to remedy. I ran the Windows 7 Upgrade Advisor, and my computer would not be able to upgrade. Please, can someone tell me how to make it only a word processor without updates or internet connection? (I already have a new computer with Microsoft Windows 7 Home Premium, it's the computer that I use. The old computer is just sitting there and once a week or so I updates.) I appreciate your time, thank you!

    original title: old computer unstable

    http://Windows.Microsoft.com/en-us/Windows-XP/help/Setup/install-Windows-XP

    http://www.WindowsXPHome.WindowsReinstall.com/sp2installxpcdoldhdd/indexfullpage.htm

    http://aumha.NET/viewtopic.php?f=62&t=44636

    Clean install XP sites
    You can choose which site to reinstall XP.

    Once it is installed, then you do not have to connect what anyone, however, some updates may be required to perform the work, test this by installing work and see if you get an error msg. Except that you should be fine.

  • Best practices for the integration of the Master Data Management (MDM)

    I work on the integration of MDM with Eloqua and are looking for the best approach to sync data lead/Contact changes of Eloqua in our internal MDM Hub (output only). Ideally, we would like that integration practically in real time but my findings to date suggest that there is no option. Any integration will result in a kind of calendar.

    Here are the options that we had:

    1. "Exotic" CRM integration: using internal events to capture and queue in the queue changes internal (QIP) and allows access to the queue from outside Eloqua SOAP/REST API
    2. Data export: set up a Data Export that is "expected" to run on request and exteernally annex survey via the API SOAP/REST/in bulk
    3. API in bulk: changes in voting that has happened since the previous survey through the API in bulk from Eloqua outside (not sure how this is different from the previous option)

    Two other options which may not work at all and who are potentially antimodel:

    • Cloud connector: create a campaign questioning changes to schedule and configure a connector of cloud (if possible at all) to notify MDM endpoint to query contact/lead "record" of Eloqua.
    • "Native" integration CRM (crazy): fake of a native CRM endpoint (for example, Salesforce) and use internal events and external calls to Eloqua push data into our MDM

    Issues related to the:

    1. What is the best practice for this integration?
    2. Give us an option that would give us the close integration in real-time (technically asynchronous but always / event-based reminder)? (something like the outgoing in Salesforce e-mail)
    3. What limits should consider these options? (for example API daily call, size response SOAP/REST)

    If you can, I would try to talk to Informatica...

    To imitate the integrations of native type, you use the QIP and control what activities it validated by internal events as you would with a native integration.

    You will also use the cloud api connector to allow you to set up an integration CRM (or MDM) program.

    You have fields of identification is added objects contact and account in Eloqua for their respective IDs in the MDM system and keep track of the last update of MDM with a date field.

    A task scheduled outside of Eloqua would go to a certain interval and extract the QAP changes send to MDM and pull the contacts waiting to be sent in place of the cloud connector.

    It isn't really much of anything as outgoing unfortunately use Messaging.  You can send form data shall immediately submit data to Server (it would be a bit like from collections of rule of integration running of the steps in processing of forms).

    See you soon,.

    Ben

  • What are the best practices for creating only time data types, and not the Date

    Hi gurus,

    We use 12 c DB and we have a requirement to create the column with datatype of time only, if someone please describe what are the best practices for the creation of this.

    I would strongly appreciate ideas and suggestions.

    Kind regards
    Ranjan

    Hello

    How do you intend to use the time?

    If you are going to combine with DATEs or timestamps from a other source, then an INTERVAL DAY TO SECOND or NUMBER may be better.

    Will you need to perform arithmetic operations on time, for example, increase the time to 20%, or take an average?   If so, the NUMBER would be preferable.

    You are just going to display it?  In this case, DAY INTERVAL in SECONDS, DATE or VARCHAR2 would work.

    As Blushadow said, it depends.

  • HTML and CSS best practices for Eloqua?

    Hello Topliners community,

    My name is Ben and I am a Web Designer. Currently looking for guidance on best practices in HTML and CSS when you work with Eloqua. I am interested in best practices for email and landing pages.

    Thank you

    Ben

    For landing pages, you can use a bit of HTML, CSS, and Javascript like on any other page. For example, we use the Bootstrap on a couple of our Eloqua landing pages.

    Support for HTML and CSS is much more limited. It is one of the best resources I've seen for CSS support:

    http://www.campaignmonitor.com/CSS/

  • What is the best practice for a 'regular' Server VMware and VDI environment?

    What is the best practice for a "regular" VMware Server and VDI environment?   A single environment (ESXi and SAN) can accommodate two if it is a whole new configuration?  Or even better to keep separate?

    Enjoying inputs.

    Quick and dirty answer is that "it depends."

    serioulsy, it depends really two things budget and IO.  If you had the money for two without then buy two and don't have to host your server environment and the other for VDI desktop, their IO profiles are completely different.

    If this is not the case, try to keep each type of use for their own dedicated LUN.

  • best practices for the storage of the vm and vhd

    no doubt this question has been answered not once... Sorry

    I would like to know the best practice for the storage of the vm and its virtual hard disk to a SAN.

    Any show advantage does make sense to keep them on separate LUNS?

    Thank you.

    It will really depend on the application of the virtual machine - but for most of the applications no problem by storing everything on the same data store

Maybe you are looking for