Try to understand Throwable

I saw some sample codes like:
[Base Exception Class]
public class BaseException extends Exception {
public BaseException() {super();}
public BaseException(Throwable exception) {
super();
this.nestedException = exception;
}//end constructor
[Sub Exception]
public class TestException extends BaseException {
public TestException(Throwable exception) {
super(exception);
public TestException() {
super();
[Calling Class]
public Result getData() throws TestException {
try {
connection = ConnectionHelper.getConnection(...);
} catch (SQLException e){
TestException te = new TestException(e);
te.setErrorCode("10000");
throw te;
--What is the purpose of passing the e as Throwable in
new TestException(e);
It seems to me that if use:
TestException te = new TestException();
will also create the object. And
te.setErrorCode("10000");
throw te;
will be just fine. Then why should use the Throwable e to initiate the Object
TestException? Or what is the usage of use the Throwable?
Thanks
Scott

Throwable is the superclass of Exception (or somewhere up there).
The purpose is that you catch an exception in your code, but want to throw a new one, but want to include the original one that started it all.
Generally, I don't normally do that, but it does happen in some places. I've seen this in JSP all the time (what Tomcat does, not what I've done in JSP).

Similar Messages

  • Dear concern try to understand what i am asking to you that some one calling me and my phone is ringing or that time i am nt using my phone that is in lock mode that time if i want to disconnect that call without using sleep/wakeup botton.So tell me

    Dear concern try to understand what i am asking to you that some one calling me and my phone is ringing or that time i am nt using my phone that is in lock mode that time if i want to disconnect that call without using sleep/wakeup botton.So tell me another way to disconect that call in given situation.kindy suggest.

    3 topics with the same question?
    Please stop creating new topics & start using the ones you already created, they are listed under your activity (click your own username).
    kumar kalptaru

  • Expecting a cartesian join but did not get 1 (try to understand what is hap

    Hello Oracle XML DB gurus,
    I have successfully registered my schemas and inserted about 10,000 XML documents into the repository. Now I need to start reporting on the data that is in the documents. Following is a simplified form of my set-up.
    I have a table that contain a XML_TYPE column that is schema based.
    I will call the table TEST_REF it has two columns: ID number (PK) and XML_DOC which is of the foo schema.
    foo schema has the following structure (foo is unbounded).
    <DataSet>
    <fooList>
    <foo>
    <val1></val1>
    <val2></val2>
    </foo>
    <foo>
    <val1></val1>
    <val2></val2>
    </foo>
    </fooList>
    </DataSet>
    What I would like to do is select the XML document that I want to extract data from using the ID column. After that I wanted to be able to select all of the data values in /DataSet/fooList/foo from that document (val1 & val2).
    I was able to do just that using the following query. However, I do not understand why the following query does not give me a cartesian product when I try to operate on mulitple documents. I'm actually getting exactly what I want, which are the individual data values from each document. I just need to understand what is going on. Does the table() function when used in this fashion perform a inner join for you? I hope this make sense.
    select doc.id, extractvalue(Column_value,'/foo/val1') as VALUE1,
    extractvalue(Column_value,'/foo/val2') as VALUE2
    from test_ref doc,
    table(XMLSequence(extract(doc.XML_DOC,'/DataSet/fooList/foo'))) foobar
    where doc.id ='1'
    ------------------------ second where causes the I thought would cause a cartesian join--------------------
    where doc.id in (1,2)
    Sample data and results when using second where clause:
    ID=1
    <DataSet>
    <fooList>
    <foo>
    <val1>2</val1>
    <val2>22</val2>
    </foo>
    <foo>
    <val1>4</val1>
    <val2>44</val2>
    </foo>
    </fooList>
    </DataSet>
    ID=2
    <DataSet>
    <fooList>
    <foo>
    <val1>1</val1>
    <val2>11</val2>
    </foo>
    <foo>
    <val1>3</val1>
    <val2>33</val2>
    </foo>
    </fooList>
    </DataSet>
    Results:
    ID Value1 Value2
    1 2 22
    1 4 44
    2 1 11
    2 3 33
    If what I'm asking does not make sense please let me know. I'm a newbe with this Oracle XML DB stuff. However, I really like what I have seen so far!
    Thanks in advance
    Derrick

    It's a correlated join...

  • Try to understand the bequeath process

    Hi,
    I want to understand the bequeath process. As I know, you don't have to use listener to connect the database if you log on the server. You can use the bequeath protocol, right?
    In my rac environment, I have got the following situation.
    1, ps -ef | grep oracle
    oracle 5695 1 0 12:55 ? 00:00:00 oraclegrieth1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    oracle 5804 1 0 12:55 ? 00:00:00 oraclegrieth1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    oracle 5956 1 0 12:55 ? 00:00:00 oraclegrieth1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    2, echo $ORACLE_HOME
    [oracle@css-rac1 ~]$ echo $ORACLE_SID
    GRIETH1
    3, lsnrctl status
    Service "griethXDB.css-net" has 2 instance(s).
    Instance "grieth1", status READY, has 1 handler(s) for this service...
    Instance "grieth2", status READY, has 1 handler(s) for this service...
    4, sqlplus /nolog
    SQL> conn sys as sysdba
    Enter password:
    Connected to an idle instance.
    SQL>
    5, sqlplus /nolog
    SQL> conn sys@grieth1 as sysdba
    Enter password:
    Connected.
    SQL>
    Why can I without using @grieth1 not to connect the database?
    Message was edited by:
    user318649

    The SID is case sensitive in Unix.
    Your SID appears to be grieth1 as opposed to GRIETH1.
    Please try using grieth1 for your SID.
    Sybrand Bakker
    Senior Oracle DBA

  • Try to understand OWB

    I want to load a data warehouse I have designed and modelled with Erwin with OWB.... and I really have lots of problems to understand how this product works. I have 2 years experience in ETL with data stage mainly (and SQL with oracle, informix and SQL server) but i did not follow any course about OWB and have to load the data within 2 weeks in a small dwh. I have followed this kind of tutorial : http://otn.oracle.com/products/oracle9i/htdocs/9iobe/OBE9i-Public/obe-dwh/html/owb/owb.htm but this is really not enough! I would like to insert text in some fields, dates, do some lookup to load fact tables, some transformation, some loads using if then else,... constraints and derivations (using datastage vocabulary) but I do not have information enough to go further and do not find my way in owb. I also tried using the user guide but this is really not the best reference to try a quick step by step self training with owb. Would you have some reference to do so? Is there not any tutorial,... PLEASE, need help urgently! Thank you in advance!
    Samir Temara : [email protected]

    As for any ETL tool which inevitably contains complex features, it takes some time for the users to familiarize with OWB. The only possible path is the tutorial, mentioned by you, a class or (most useful) -actual implementation experience. A person with 2 years of ETL experience (like yourself) should be able to acquire a reasonable command of the product in 1-2 weeks, and yes you will have to refer to the user guide.
    In a nutshell, to complete the OWB implementation you will have to:
    1.install OWB (and define the OWB design and run-time environments),
    2.define your data sources and design your target data structures in OWB,
    3.define the processes which extract data from the sources, transform it and load the data into the targets called mappings (a mapping usually translates into one or more PL/SQL procedures which will be run in the database),
    4.Deploy the target objects and mappings into the target (run-time) environment. These are database objects like tables, PL/SQL procedures, dimensions etc.
    5.Run the deployed mapping procedures (which will extract data from the source, transform it and load it into the target environment) as needed
    6.Periodically modify and redeploy your mappings and target objects to reflect possible changes in the source or target business rules as well as changes in your technological infrastructure (DB upgrades, OWB upgrades etc.)
    You can find more documentation at the following web site:
    http://otn.oracle.com/products/warehouse/content.html
    Regards:
    Igor

  • Shadows... try to understand them...

    Ok I've posted a few questions over the past 12 hours, ugh up almost all night playing with iWeb.
    I'm making a website for a friend's who owns not only a "biplane rides" business but is also the manager of a circa 1920's grass strip airport (all very cool) I really want it to be "nice"... I'm struggling with the shadow option, sometimes it works and sometimes it doesn't and I'm wondering if its me or the limits of the program.
    I've used the shadow option on text and on pictures - with and without frames. However I have line that divides the FAA Nav information (elevation, open to public, FAA identifier, etc) from the body of the text on the page. It's just a single line. I'd like to add a slight shadow to that and the shadow option does not work. Am I doing something wrong or can you NOT put a shadow on shapes?
    Another shadow issue - when make a text box and then go to inspector and go to the 6th "tab" on inspector with the square and circle on it... if I pick "stroke" and then line and pick one of the dotted lines to outline a text box (this box is going to feature "special discounts" so I want it highlighted). If I chose the shadow option there as I type it puts a shadow on the text. I don't want that, I want the dotted line around the text box shadowed. Can I do that.
    Lastly, I'm using the Darkroom template (the Welcome one) and then trying to customize it some so its not too templatey looking. It has those pictures grouped together in such a way that they all have the same outer border... so when I try to put a shadow around that it does each picture individually (not to mention once in a while I "hit those pix and they move and screw up how difficult it was to line them up). Now that I have them set, can I group the pix together so they are one and then put a shadow around that outer border.
    I'm sorry I can't put the site up yet for you to look at, its going to be on Godaddy and its not set up to upload yet (they said 24-48 hours).
    Susan

    Hello Susan,
    susan-kelly wrote:
    It's just a single line. I'd like to add a slight shadow to that and the shadow option does not work. Am I doing something wrong or can you NOT put a shadow on shapes?
    Yes, you should be able to add shadow to shapes.
    I want the dotted line around the text box shadowed.
    No, it will add the shadow to the text. Put a rectangular shape over the text box and give the rectangular shape a shadow (it will shadow on all 4 lines, if you don't want that : add a line shape on top of the bottom line of the rectangular and add shadow to the line)
    can I group the pix together so they are one and then put a shadow around that outer border.
    Grouping : Not that I know in iWeb '08.
    Instead of clicking on them individually to select them, drag your mouse over all of them so you select them all without risking to move them.
    If 1 picture is overlapping an other (ex. behind the other), shadow will look messy.
    A quick way to avoid this is by "masking" the picture that is overlapping.
    Kind regards,
    Leo
    PS : you may want to publish your website to a folder on your computer just for testing with different browser as not all of them understand the command "shadow"

  • Guys I need help please read this and try to understand it

    I want to know that what does a new driver has to do with modem that it makes noises like "click click" during the gameplay...
    Right now i am using the old version that came with the box.It is 43.45 that has been released almost an year ago.Believe me guys it works almost perfect no noise and nothing.
    If i come into 2004 then the latest version is 56.72 .I've heard that nVidia has uploaded this driver on april 1st (Happy fool day from nVidia). Thus guys i wish to come into this new year and i want to update my driver,and when i install this driver it will give me trouble from the modem. Couple of more things i have checked and they're the driver that came with the box is by DETONATOR and these days the drivers says FORCEWARE and the second thing is that the old software that comes in CD from nVidia doesnt contain "DIGITAL VIBRANCE" but all new drivers has it. Could this problem is from here? I am totally puzzled first i thought that there is something wrong with the graphic card but when i checked it was modem.When i changed the modem same problem.I changed the slot, same thing. Thought there is a virus or spyware but there was not.Hardware is ok because old version is working fine.
    PLEASE GUYS I NEED ALL OF YOUR SUGGESTIONS DONT IGNORE MY PROBLEM
    GRAPHIC CARD is MSI nVIDIA FX-5200
    MB is MSI 865P-NEO
    Modem is CONEXANT
    One more thing i want to mention
    if i turn on pc and start playing games(any 3D games) will run perfect on any driver whether it is new or oldest. But if i connect to internet with modem and later disconnect it and then start playing games or any 3D presentation the modem starts crying (CLICK CLICK) and this is the same sound that comes when we start connecting(dialing, probably when it gives signal) the internet.
    In this situation i have to completely turn off my pc and also unplugging it (DISCHARGING ELECTRICITY). and then, when i turn on the pc and start any game without connecting to internet everything runs fine (On the new drivers)....
    Now as i have mentioned before i changed the slots removed and even reinstalled.Nothing happens just a click click sound.
    but for the old driver everything runs fine even if i am online and watching 3D presentations or playing games....
    So anybody ????????????????????????

    assuming its a pci one as he suggests it may well be an irq thing
    try playing swap the pci slot with it
    '

  • Try to understand "-" in script

    hi,
    does anyone kindly explain what "-" is and how to use "-" in shell script?
    for example
    trap "ls -a" 2
    trap - 2
    How to understand here "-"?

    # cat junk
    #!/bin/ksh
    trap "echo 'I said do not interupt me, dummy!'" 2
    echo 'Do not interupt me...'
            I=0; while ((I<3)); do ((I+=1)); sleep 60; done
    trap - 2
    echo '\nOk, leave whenever you want!'
            while (true); do echo "the current time is `date`"; sleep 60; done
    # ./junk
    Do not interupt me...
    ^CI said do not interupt me, dummy!
    ^CI said do not interupt me, dummy!
    ^CI said do not interupt me, dummy!
    Ok, leave whenever you want!
    the current time is Thu May 15 22:16:56 CDT 2008
    ^C#

  • Try to understand JS function doSubmit

    Hello,
    I'm trying to understand how the APEX built-in function doSubmit() works.
    Function from htmldb_html_elements.js:
    function doSubmit(r){
         flowSelectAll();
         $x_Value('pRequest',r)
         document.wwv_flow.submit();
    } // End doSubmit()
    My question:
    In document.wwv_flow.submit(), what is wwv_flow ? A JS class ? Where is it defined ?
    I guess this code calls the PL/SQL procedure wwv_flow.accept
    Thanks
    Bertrand

    OK !
    sorry I am not a JS master
    The code source of the HTML page contains:
    <form action="wwv_flow.accept" method="post" name="wwv_flow" id="wwvFlowForm" >
    That means that when doSumit is called, the request wwv_flow.accept is sent to the HTTP server
    regards,
    Bertrand
    Edited by: user639808 on 29.04.2009 09:43

  • HI. I am new to Apple, so please try to understand.

    I just purchased the IMAC 26". I am very impressed with it after using Windows for many years. I am looking for an AOL browser that I can install on my IMAC. Does anyone have any suggestions or have you had any luck with with a version of AOL that you could recomend me to install.
    Thanks All
    Carmanhere

    Once you sort out that you don't need any AOL software because the sytem requirements for their software state:
    AOL® System Requirements
    Windows XP, Vista, or 7
    Internet Explorer 7.0, 8.0, or 9.0
    peruse these:
    Switching from Windows to Mac OS X,
    Basic Tutorials on using a Mac,
    Mac 101: Mac Essentials,
    Mac OS X keyboard shortcuts,
    Anatomy of a Mac,
    MacTips,
    Switching to Mac Superguide, and
    Switching to the Mac: The Missing Manual, Lion Edition.
    Additionally, *Texas Mac Man* recommends:
    Quick Assist,
    Welcome to the Switch To A Mac Guides,
    Take Control E-books, and
    A guide for switching to a Mac.

  • Hi I try to understand I download same games on they say its free now i tune charge

    ebit:APL*APPLE ITUNES STORE866-712-7753 CA US
    $-10.61
    $397.70
    0
    12/17/2013
    Debit:APL*APPLE ITUNES STORE866-712-7753 CA US
    $-4.24
    $78.31
    12/17/2013
    Debit:APL*APPLE ITUNES STORE866-712-7753 CA US
    $-10.61
    $82.5

    Looks as though you have made in-app purchases on these games. You need to contact iTunes support for assistance on this. http://www.apple.com/emea/support/itunes/contact.html
    No one here can help you with this.

  • Try to understand the Application Server

    Assume there are three web sites hosted in an Application Server, they are www.1.com, www.2.com, and www.3.com, repectively.
    When a user in somewhere type in www.1.com in his/her browser, the server machine that hosts the web sites will be located first. Then how is each individual web site located on the server, remember there are thee web sites hosted on the same machine?
    Thanks to help
    Scott

    Hi,
    CHapter I
    http://iasdocs/iasdl/101200doc/web.1012/b14007.pdf
    is a good starting point.
    regards

  • Try to understand application server

    Assume there are three web sites hosted in an Application Server, they are www.1.com, www.2.com, and www.3.com, repectively.
    When a user in somewhere type in www.1.com in his/her browser, the server machine that hosts the web sites will be located first. Then how is each individual web site found on the server, remember there are thee web sites hosted on the same machine?
    Thanks to help
    Scott

    Hey, we meet again ;-)
    In this case, you generally will have a machine which has three network interface cards, each with it's own IP address and hostname (or some software tricks to do this for you).
    If you run one OC4J instance, then what you can do is to create 3 separate websites and bind each one to the specific IP address/hostname you want it to utilize.
    So copy the existing http-web-site.xml file and make three copies of it site-one.xml, site-two.xml and site-three.xml.
    Then in the j2ee/home/config/server.xml file, add 3 additional entries for the new websites
    <web-site path="./site-one.xml"/>
    <web-site path="./site-two.xml"/>
    <web-site path="./site-three.xml"/>
    In each of these new site-*.xml files, set the website to listen to the host/port you want it to represent:
    <web-site host="www.1.com" port="8888" display-name="OC4J 10g (10.0.2) HTTP WebSite" >
    <web-site host="www.2.com" port="8888" display-name="OC4J 10g (10.0.2) HTTP WebSite" >
    <web-site host="www.3.com" port="8888" display-name="OC4J 10g (10.0.2) HTTP WebSite" >
    That should do it I think.
    cheers
    -steve-

  • If You Want To Try FaceTime, Read This Thread

    http://www.tuaw.com/2010/06/25/let-apple-demo-facetime-with-you-live/
    You can call Apple. The number is 1-888-FACETIME. Yes, it is 11 digits.

    Your post has nothing to do with my post...
    As for YOUR post...
    Most people don't know the true definition of multitasking, and the difference between multitasking and backgrounding.
    On a phone, you can't multitask with anything except music. On a computer, you can watch a movie, monitor an IM conversation you are having with a friend and type up a document for work/school.
    On a phone? NO.
    Apple is ONLY calling this multitasking because people are sheep and too stupid to realize that you CAN'T multitask on a mobile device, ESPECIALLY ON A CELL PHONE.
    What we are actually doing is backgrounding, and when you get down to the heart of how the backgrounding works, it makes people's heads try to explode. They try to understand it, but those who aren't technically inclined blow up the whole definition out of proportion. Also, developers are the reasons why apps don't multitask, NOT Apple (although Apple shoulda' gotten on the ball with backgrounding sooner).
    Pretty much, there are 7 APIs that are available to devs, if they want to keep running a service in the background. This is much more efficient, because if you can't see the application, what is the point of still having it run??? It should ONLY keep the SERVICE open that it needs.
    As for the "multitasking", as long as the dev recompiles their app against the new 4.0 SDK (they don't have to change any code, merely open it in the new SDK and recompile it), the app will then "freeze" itself in the state it is in when the end user hits the Home button. Then, when the user goes back the app, it will "unfreeze" itself and to the end user, it will seem as if it was never closed.
    As for the system handing this, if an app is opened that needs more memory than is available, it will look at the frozen apps, and will find the one that you used LAST (the "least recently used" algorithm) and will close that one, and thus, the CPU and memory that it needs to run the new app will be obtained.
    However, the end user who wants to understand but doesn't, won't understand this. I don't like when I hear people complaining about this issue.
    Here is a link to the 7 backgrounding APIs.
    http://www.pcmag.com/article2/0,2817,2362459,00.asp

  • Hi, guys: hard to understand XI IDoc to file,

    I have work through this scenario. My colleague have problem to understand it. I think it is a little hard to explain it.
    About logical system, We can say ERP send IDoc to  XI , and XI convert it to file. and then the logical system name should be XI client's.  But in XI, we always define business system or business service for other systems not XI itself.  And service FTP2 must have a logical system for IDoc related scenarios , others(RFC,JDBC, file and etc) don't  need.
    When we define logical system and partner profile for file system, we use RFC destination from ERP to XI.
    For ERP A to ERP B, it is easy to understand, we should define logical system for B system in A , which is identical in B.
    logical system, partner profile in SAP ERP, and business service/ business system in XI are both to represent a (logical)business system.
    -- if ftp2 use logical system of XI, then another system can't use it. and maybe it can't work, business system can't use XI's logical system.
    Any ideas? Am I right?

    HI Shen,
    You are try to understand this bit complicated concept is on right track.
    Let me explain this step wise.
    1. About logical system, We can say ERP send IDoc to XI , and XI convert it to file. and then the logical system name should be XI client's. But in XI, we always define business system or business service for other systems not XI itself. And service FTP2 must have a logical system for IDoc related scenarios , others(RFC,JDBC, file and etc) don't need.
    ---->
    Here XI is just middelware so While sending the IDOC from R/3 to XI you need the Logical system with Receiver Port as directing to XI client. The Receiver Logical system is not imp. incase of sender IDOC.
    But when you will be sending the IDOC from XI to R/3 then the Logical system should be maintained, because the inbound IDOC processing program will work as per the details of Contorl IDOC and the Logical system that will point from XI. This will not be the case for other RFC, JDBC, file etc, as they don't have any kind of Control -Records to be maintained.
    2. if ftp2 use logical system of XI, then another system can't use it. and maybe it can't work, business system can't use XI's logical system
    ---->
    Yes, Once you have used the Logical system name in any of the Business service or Business system then you can't re-use it. This makes possible the feature of Re-usability. You can create the multiple communication channels under this Business service/system
    Hope this will be clear now
    Thanks
    swarup
    Edited by: Swarup Sawant on Jun 25, 2008 10:24 AM

Maybe you are looking for

  • P6 EPPM configuration wizard won't connect to database server

    I have installed P6 8.3 and Weblogic on one server (application server). On another server SQL is installed. When i run the P6 EPPM Configuration Wizard i get as far as the step 'Database Type & Connection' where i can fill in the details of the serv

  • Account No

    I need to customize "Supplier Payment History" Report in EBS R12... I want to add Account number in the report.... Can any one tell me please from which table I can find account number and account details..... Thanks Awan

  • I have upgrade my iphone at 6.1.3 and  since this my iphone is block with the sign itune with the plug

    I have upgrade my iphone 4 to the version 6.1.3 and since this time is block with the sign itunes and the plug...i don't know what to do to unblock it

  • Reinstalling adobe acrobate 7.1.0...no support to register?

    I am trying to reinstall adobe acrobat 7.1.0 professional, registration is required but there there isn't any support to register via internet or phone. Now what can I do. I rarely use so I don't want to purchase a new program.

  • Cool Banshee Idea..

    So i'm sitting here reminiscing about how my old iPod could easily sync with banshee (now that i have a nano 6g i sync through a virtual machine) and i think, boy it would be cool if i could make my banshee folders sync to playlists so that i could a