What do you think about using exceptions for something more than errors

if you look the java.lang.Exception description at the JDK javadoc, you can see the following text:
"The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch."
... we can�t see "error" word anywhere!!
What do you think about using exceptions for something more than errors? Can be possible use them as a way for send information to upper layers?
Thankx in regards...

it seems that what you say is a functional way of achiveing that, yes
but Exceptions are generally reserverd for "Exceptional" situations ie program messing up or invalid data
it does require a fair bit of processor time to actually generate and throw an Exception.
so, all in all its "better" to use "normal" condition flow control to achive what you want.. you can always return early, break loops, call methods to pass information

Similar Messages

  • What do you think about Quick Office for the IPad

    What do you think about Quick Office for the IPad

    You could also have a look at the following www.rollapp.com, I have only recently found it.
    You have access to the full OpenOffice and LibreOffice library of program's  and it syncs with Dropbox,google docs and others.
    You do require an Internet connection as it is cloud based.
    At present I have only used it for quick editing but I think it definitely looks promising and it is free

  • What do you think about using plant in this way?

    In your systems each plant is "real" - has real location and real manager, or also you have “virtual” plants to monitor a particular special process (for example: if you want different FI bookings for the same material movement type, or if you want to track special kinds of stock)?
    What do you think about using plant in this way?

    Hello Friend,
    It is surely a good step from FI point off view but creating something virtual and transacting on it, from MM point of view is not feasible as it is difficult to frame the scenario and work on it.
    Rest is your decision.
    Regards,
    Pradnyesh Naik

  • What do you think about the iPhone 4 for my 11 year old daughter

    What do you think about the iPhone 4 for my 11 year old daughter

    It should be a good choice. I recently got the 5C which typically is $99 with supported carriers. Verizon, AT&T, Sprint provide attractive pricing with a two year contract or it you are adding a line to your current service. I have several friends using the 4S, and they have been very pleased with them.

  • What do you think about BIOS 1.8 for KT4V

    What do you think about BIOS 1.8 for KT4V?
    Is this version really better?
    CRC error- still  be occured?

    Hi
    This bios is catastrophic(k).I flashed bios and boot to win 98 and no one of my programs wont too work.Every time I try to start anything there is a note "this program performed illigal op...".So I re-installed win but problem remains.Now I'm back on bios 1.7.

  • What do you think of this Design for Multiple Threads

    Hi Java Experts ;
    I'm curious to know what you think about this design for a multhreaded app i'm working on.
    I have a controller thread that (a.) creates threads and (b.) keeps a reference to threads that it creates (by sticking them in a hashtable along with the generated Id for that thread).
    When a created thread completes its job, it decrements the thread counter and removes its reference from the hashtable before it finishes its run method.
    Now here's the interesting part in my controller thread i'm creating new threads on the fly with this infinite loop
         public void run(){
              while(true){
                   try{
                        Thread.sleep(500);
                   }catch(InterruptedException e){
                   if(threadCounter<maxThreadCount && moreJobsToDo.size()>0){
                        createDomainThread();
              }//end while
    what do you think about this pattern ? My goal is to maintain about 200+ created threads running at all times with this pattern.

    jeff kesslerman's book says about threads
    "5.2.3 Threads
    The impact that threads have on RAM footprint isn't a problem for most programs, but running threads do need space to store their stack state, and the system- specific data structures do consume memory.
    Because runtime implementations vary widely in how threads are handled, you might encounter situations where the impact threads have on footprint is significant. For example, some ports of the JRE create a heavyweight OS process for each running thread. In an application that uses many threads, this means that thread costs, rather than class or object costs, can become the dominant factor in the program's memory consumption.
    You shouldn't avoid using threads-they're necessary in many cases, and generally don't have a large impact on footprint. However, you should be aware that the impact can be very different across runtimes. This is one of the reasons it's a good idea to measure performance characteristics under your program's different target environments. "
    Question #1: how does garbage collection go about clearing the stack state, and the system- specific data structures that consume memory.
    Question #2: in my situation, each worker thread's activity is not as brief as a simple server request. Each thread does a lot work and does a lot of network connections. on average I would say 100 http request - each of which can be easily blocked or delayed significantly. Therefore each worker thread may operate for between 2 - 10 minutes.
    Do you think thread pooling is useful in this situation ?
    stev

  • What do you think about the html5?

    I've been seeing developers philosophizing about the future, and I want to know what do you think about the brand new html5?
    mainly because the html5 can take out of the market technology ( flex ).
    thanks for the opinion!!!
    [email protected]

    Yep this is most definitely not just a rumor, I've found plenty of sources talking about this.
    Here's someone's take on HTML5, a non-Adobe perspective, from a Silverlight developer.  I thought this would be interesting to mention.  Not sure I agree 100% with everything said (IE may not be most used browser and I don't believe in DRM), but it's an interesting read anyway:
    Yes, you can do a LOT of stuff with HTML5 + JS that Silverlight is good for. But HTML5 will only reach Candidate Recommendation status in 2012 - if Silverlight keeps the current pace, it will be at V7 by then.
    HTML5 will only get you approximately what Silverlight had at V1.0. A Canvas element, some video playback capabilites, and a Javascript programming model. Can you imagine how further advanced Silverlight 4 is at the moment?
    Actually, scratch that - the video quality and availability of HTML5 is a lot worse than what Silverlight has to offer. There is no DRM, no Smooth Streaming, not even full screen! No GPU acceleration either. Even the codec HTML5 has to support is not standardized! This results in Firefox 3.6 having only Theora decoder, and Youtube experimenting with HTML in H.264 (on the same day FF3.6 launched), only playable in approx. 4-5% of the world's browsers.
    Internet Explorer is still the most widely used browser on the web, and does not have HTML5. Currently, there are more Silverlight capable browsers browsing the web than HTML5 compatible ones. I don't think that in the next 3 years you will be able to create an HTML5 app and hope that at least 50% of the world's population can view it without switching browsers. (and remember: installing a plugin is a lot less hassle than switching to a new browser!)
    HTML5 will not be truly cross-browser standard for quite a long time, if ever. There are too many things that the browser developer can do as they wish - just think about the aforementioned video codec issue. There are too many little differences in each browser's Javascript implementation to make it really portable.
    The developer story: nothing in the HTML + JS world comes close to the awesome Visual Studio and Expression Blend tools. Javascript is cool for small apps, but cannot hold a candle to C# when it comes to serious development. Fighting with browser and OS incompatilities takes up a huge amount of time for any HTML website or web app - with Silverlight you don't have this.
    Just compare what the best HTML / Ajax company in the world (Google) did with maps, and what MS did to see the difference. Go tohttp://maps.google.com/ (watch out - the Streetview part is in Flash, not Ajax), and compare it to http://www.bing.com/maps/explore/. That is the difference I am talking about.
    Of course he means (or should have meant) Flex/Flash rather than just Flash.  As for the GWT and other AJAX fanboys who I guess think browser compatibility problems are going to be a thing of the past (or won't be a drag on corporate bottom lines - haha), it makes you wonder what other wild fantasies they're envisioning for the future.  Next they'll come and tell us XML-based protocols are going to be as fast as AMF...

  • What do you think about this article?

    What do you think about this article?
    +"A lithium-ion battery provides 300-500 discharge/charge cycles. The battery prefers a partial rather than a full discharge. Frequent full discharges should be avoided when possible. Instead, charge the battery more often or use a larger battery. There is no concern of memory when applying unscheduled charges"+
    Seems to make sense..
    I knew that lithium-ion batteries have no memory concerns, but still I thought that it was a good idea to charge and discharge the battery of a new iPod (or laptop) at least the first time..
    Any thoughts?
    Message was edited by: acidbahia

    The reason it's sometimes recommended to do a full discharge/charge cycle on a new device is to calibrate the battery indicator. It doesn't do anything for the battery itself.
    The quote you've given agrees with everything I've been taught about lithium-ion batteries.

  • What do you think about this product ?

    Hi,
    I want to have access to SAP ECC 6.0 for personnal use, so I find a hard drive in the following web site :
    http://www.erpselftraining.com/product/SAP-server-MCOD.html
    Please can you tell me what do you think about this hard drive ? has anyone already tried it ? do you advise it ?
    Your answers will be appreciated.
    Kind regards.

    is it for learning purpose ? then why dont you just download the demo versions of SAP!!

  • Adobe, what do you think about that ?

    - one day I was demoing DPS to 35 people in Paris. The whole day the servers were barely accessible. For the reputation and reliability of DPS that was wonderful.
    - another day I was doing a little DPS demo for Adobe. Again the same problem.
    - another day, the demo was ruined because the servers were so slow.
    - this Monday morning, I open my iPad and I can see my latest Folio in ACV.
    In the afternoon I join Adobe reps and partners and other VIPs in London for the launch of CS6. There I go with my iPad and what a surprise when I want to show the Folio to an Adobe representative ?
    Despite being signed in, all my folios where archived and all in Download state. I could not access a WiFi and even if I could I think that downloading 500 Mb would be impossible.
    Many people where asking me :
    —"And are you teaching DPS ?"
    – I said "Yes, I'm even working on it for real projects."
    — "Do you have one to show us ?"
    – "No, because Adobe's software, for a reason that I don't understand, deleted all my folios a few moments ago and I would have to redownload them again. ACV sucks".
    People to who I have talked to where Adobe people, chiefs of graphic studios (newspaper, agency,...), potential clients for DPS,...
    There was even of Adobe person that told me : "We are receiving a lot of complaints about the technical model of DPS, and you're right, it's terrible".
    There are so many problems with this app and with the servers.
    DPS's reputation will may be better when one day we just play offline with the folios like a PDF in GoodReader for instance.
    DPS is exploding my bandwidth.

    Peter, that is sad. If a publisher decides to pull the issue from the
    server, that's like burning down their own library of things.
    Apple wanted adobe to stop downloading such large data into the storage
    that will be backed up. So issues now go into the cache, that will not be
    uploaded to the Icloud storage.
    Because you buy a 64gb iPad, but get only 2Gb of online storage.
    —Johannes
    (mobil gesendet)
    Am 26.04.2012 18:35 schrieb "Peter Villevoye" <[email protected]>:
       Re: Adobe, what do you think about that ?  created by Peter Villevoye<http://forums.adobe.com/people/Peter+Villevoye>in
    Digital Publishing Suite - View the full discussion<http://forums.adobe.com/message/4363125#4363125

  • I would like to have a solar panel on my iPhone so I can have a constant state of charge what do you think about that?

    I would like to have a solar panel on my iPhone so I can have a constant state of charge what do you think about that?

    I am among this community since I invested much into this corporation. I rather go to the consumers just to discuss an idea I would like for this corporation to achieve. I do not like to purchase third party accessories as they seem to fail my expectations or the fact that it is not worth it when i finally see what they have made. Yes they are good products but there is much disappointment when I look to third-party products that say they are engineering products for the iPhone or other Apple device I have purchase. Just a thought no need to be so hostile.

  • What do you think about our design

    Dear sir, madame,
    What do you think about our design:
    Mini Paarden shop
    Looking forward hearing your opinion.
    Kind regards,
    Mariska

    Hello Mariska,
    Browsing on an iPad, the search bar + cart Infos are hidden on the right hand side of the page (I need to scroll to see it). Depending on your target audience and the devices they uses, it might be an issue if they can't complete the order process because they don't see where the cart is...
    Apart from that, the design overall strikes me as clear enough to be browsable, IMO it does the job!

  • What do you think about EFI

    What do you think about EFI, is it good or bad? For Linux or generally
    Last edited by fk (2007-03-27 22:36:03)

    EFI is? This? http://en.wikipedia.org/wiki/Extensible … _Interface

  • What do you think about my site?

    What do you think about my site?
    www.linkx.ro
    This is my first site in flash8 so please be
    understanding:)

    I think it is pretty good. I like it. Although I have to
    agree that if you are looking for some serious business looks you
    have to go with more traditional design (HTML/CSS) and incorporate
    small flash bits that will make it look more dinamic. But that is
    just me. I have one suggestion - too much stuff man. I mean lots of
    links all over, moving things around. I understand you wanted to go
    for something dynamic and flashy but it is overwhelming to me! You
    might want to consider developing some sort of consistency and keep
    information/links/graphics bundled together so when one wants to
    find a link they would move to the link area and so on. Anyway
    looks great though for your first flash web.

  • What do you think about this software? Reliable?

    What do you think about this software? Reliable?
    http://www.macupdate.com/info.php/id/23023/filesync
    Or maybe Carbon Copy Cloner is better?
    Thanks a lot!

    I don't know Filesync, but to simply sync one folder to its backup I use SyncTwoFolders:
    http://www.versiontracker.com/dyn/moreinfo/macosx/30727
    To clone the entire hard drive to an external bootable hard disk I use SuperDuper, but CCC has an equally good reputation.

Maybe you are looking for

  • How to retrieve absence type(removal of HR_API_TRANSACTION_VALUES in R12)?

    Hi, Read the note 733287.1 and notice that the table HR_API_TRANSACTON_VALUES has been removed in R12. And the transaction data is keep in column TRANSACTION_DOCUMENT of HR_API_TRANSACTIONS table. We have several package that retrieve the PER_ABSENCE

  • Transformation activity - Audit trail or logging

    We have a big transformation file (XSL) and the input and output payload to the transformation activity is also huge. Currently, the process is failing in transformation activity and the error is FOTY0001: type error. Is there any way, by which we ca

  • Attaching the WebUtil object group to a form

    Hi. I'm hoping for some help on how to attach the WebUtil object group to a form. I go to the Object Groups node in the object navigator and click the '+' button, but I'm not prompted to attach .olb files. How do I do this? Without it attached I'm re

  • Authentication error on Job submit from EM (VNI 2015)

    we have oracle 8.1.7 on windows 2000 advance server recently updated with patch 8.1.7.2.1 and 8.1.7.2.5. Here is my SQLnet.ora file: NAMES.DEFAULT_DOMAIN = hq.xxx.net SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOST

  • Importing  pdf multi page in Illustartor

    Is it possible to import a multi page pdf in illustartor ( as I open the illustrator file I would like all pdf pages to be imported automatically in each corrsdiponding drawing table) Thank you!!!