What type of exception to catch in OO4O

I am new to OO4O.
OStartup();
session.Open();
session.CreateDatabasePool(2, 3, 2000, "mastersf.world", "crawler", "jetcrawler", ODATABASE_DEFAULT);
try {
ODatabase odb = session.GetDatabaseFromPool(5000);

sorry for the incomplete post ...
Here is my code:
OStartup();
session.Open();
session.CreateDatabasePool(2, 3, 2000, "mastersf.world", "crawler", "jetcrawler", ODATABASE_DEFAULT);
try {
ODatabase odb = session.GetDatabaseFromPool(5000);
catch (WHAT_EXCEPTION_I_SHOULD_USE e) {
When I try to catch the exception, what type I should use? I tried OException, it doesn't work.
thanks.

Similar Messages

  • Return in finally block hides exception in catch block

    Hi,
    if the line marked with "!!!" is commented out, the re-thrown exception is not seen by the caller (because of the return in the finally block). If the line is commented in, it works as I would expect. Is this is bug or a feature? I assume the return removes the call to troubleMaker() from the call stack - including the associated exception...
    Christian Treber
    [email protected]
    public class ExceptionDemo extends TestCase
    public void testException()
    String lResult = "[not set]";
    try
    lResult = troubleMaker();
    System.out.println("No exception from troubleMaker()");
    } catch(Exception e)
    System.out.println("Caught an exception from troubleMaker(): " + e);
    System.out.println("Result: " + lResult);
    public String troubleMaker()
    boolean lErrorP = false;
    try
    if(6 > 5)
    throw new RuntimeException("Initial exception");
    return "normal";
    } catch (RuntimeException e)
    System.out.println("Caught runtime exception " + e);
    lErrorP = true;
    throw new RuntimeException("Exception within catch");
    } finally
    System.out.println("Finally! Error: " + lErrorP);
    if(!lErrorP)
    return "finally";

    This is specified in the Java Language Specification, section 14.19.2 .
    -- quote
    If execution of the try block completes abruptly because of a throw of a value V, then there is a choice:
    * If the run-time type of V is assignable to the parameter of any catch clause of the try statement, then the first (leftmost) such catch clause is selected. The value V is assigned to the parameter of the selected catch clause, and the Block of that catch clause is executed. Then there is a choice:
    o If the catch block completes normally, then the finally block is executed. Then there is a choice:
    + If the finally block completes abruptly for any reason, then the try statement completes abruptly for the same reason.
    -- end quote
    "completing abruptly" (in this instance) means a throw or a return, as specified in section 14.1
    Ok? It's not a bug, it's the defined behaviour of the language. And when you think about it, this behaviour gives you the option to do what you want in your finally block.

  • 4 Types of exception and the code to handle them

    Dear all,
    I would like to know wheter runtime exception, errors exception, unchecked exception and checked exception are classified as the 4 types of exception.
    What are the java coding of them? please help.

    There are two main families of exception in Java: checked and unchecked.
    The base class for all exceptions is Throwable. Java provides Exception and Error that extend Throwable. RuntimeException (and many others) extend Exception.
    RuntimeException and its descendants, and Error and its descendants, are called unchecked exceptions. Everything else is a checked exception.
    If your method, or any method it calls, can throw a checked exception, then your method must either catch that exception, or declare that your method throws that exception. This way, when I call your method, I know at compile time what can possibly go wrong and I can decide whether to handle it or just bubble it up to my caller. Catching a given exception also catches all that exception's descendants. Declaring that you throw a given exception means that you might throw that exception or any of its descendants.
    Unchecked exceptions (RuntimeException, Error, and their descendants) are not subject to those restrictions. Any method can throw any unchecked exception at any time without declaring it. This is because unchecked exceptions are either the sign of a coding error (RuntimeException), which is totally preventable and should be fixed rather than handled by the code that encounters it, or a problem in the VM, which in general can not be predicted or handled.
    http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html

  • What type of Driver?(type1 or 2 or 3  or 4) and then why

    Hi Every one,
    Can u say what type of driver used in this program, and then tell why?.
    try{
    String userName = "user1";
              String password = "pwd";
              String url = "jdbc:mysql://localhost/test";
              Class.forName ("com.mysql.jdbc.Driver").newInstance ();
              Connection conn = DriverManager.getConnection (url, userName, password);
              System.out.println("Database connection established");     
    catch(Exception e){
    System.out.println(e);
    Kindly Reply
    Advance Thanks...

    Thanks.....
    Could you give example for type3 driversI have only ever seen one post about a type 3 driver on this forum.
    You can search here for a type 3 driver if you just want a name....
    http://developers.sun.com/product/jdbc/drivers

  • What type of hard disk should I use if I want to use it on mac and windows?

    Hey Forum,
    I am using windows xp on my macbook (snow leopard). I came across some dealers who say that there are hard disks for mac only and for both mac and windows. So, I wanted to buy a hard disk so that I can use it both on mac and windows xp, so what type of hard disk should I use? Must I partition into 2?
    or are there any harddisk in the market which is compatible for both mac and windows xp without screwing up the format(NTFS/Mac OS X Journaled)? Pls look into this matter and help me with it.
    All of your replies and suggestions is much appreciated.
    Thank you.
    Ala.

    Run, don't walk, from that dealer! and never look back
    Once in a very long while Apple will have customized firmware on drives, and it is possible to find SCSI/SAS or drives that are destined to be used with high end storage controllers.
    But that is the exception that makes the rule.
    SATA is SATA. Though.... there are now SATA III drives that don't work in XP, or that need a jumper, and Seagate and some drives have managed to deliver firmware that has caused trouble... and Apple has had to issue firmware updates to help compatibility....

  • What  type of plug in do I need to use between weblogic and tomcat please

    Hi,
    Can anybody please tell me what type of plugin do I need to install to communicate between Tomcat4.0 and weblogic6.1 sp2.actually I wanted to use a connection pool from my servlet on my local tomact where connection pool is created on remote weblogic server.........?
    I have no idea what to do. I tried including the weblogic.jar in my local classpath where my tomcat is sitting. This didnot work . I got the following error......
    I want to know is it possible.............?
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory]
    Your response is very inportant......
    Thnaks

    Thanks a lot for your rely....
    then how could I use the remote connection pool in my
    local Tomcat server.....?If thats is not possible then
    what if organisation have two webservers...? you mean
    thay have to create connection pool in two servers
    rather on one server and use it every where.....?
    Still depends on what you are trying to achieve.
    Most clustered systesm use a connections on each server. They sync the data retrieved between servers, not the connections themselves.
    If you simply one a single connection point then you need to use a driver that proxies requests to and from the real connection point.
    RmiJdbc is free at http://www.objectweb.org/.
    There are commercial drivers available, search at http://industry.java.sun.com/products/jdbc/drivers, which provide an enterprise layer for database access. They are probably more robust and feature rich than the above one.

  • What type of files can JAVA read?

    Hi,
    I'm asking whether Java can read the font format files ( files with .afr & afm extensions from adobe)?
    I'm trying to do so but it cause an exception?
    Can you help please?

    In general what type of files can we create in Java?You know that a file is nothing more than a series of ones and zeros, with eight of those bundled together as something called a byte. What they actually mean is what you make them to mean. Short: you can write and read any file type you like, but doing that semantically correct it is your responsibility.

  • What King of exception handling is done in OA framework code?

    Hi All,
    I am not a core java person but have to do some OA framework code changes.Wanted to know what kind of exception handling is done in OAF codes?
    I was looking as the seeded oracle controllers and dont see any try catch blocks.
    can anyone guide me?

    OAF java based framework, hence exception handling is similar to how its done in core java. I would advuce to better go through exception handling concepts of core java.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                   

  • What type of access does a PnP user need?

    I'm looking to a create a user to be able to deploy the 0 day bootstrap config todevices using iphone/ipad what type of access does the user need?
    Thank you

    Very tiny ones except, possibly, two. You will need to make a Genius Appointment and take it in to see if they can provide or order the screws for you. You can also check with ifixit.com.

  • What type of query should be posted in the Guidanc...

    Hi all,
    This board is primarily for help and suggestions relating to the community forums themselves, not for help and suggestions on BT products or services.  For example, if you don’t know how to quote another post, or are not sure how to change your avatar then this is the correct place to post those type of questions.  It may also be where you post a suggestion for a new topic area or other ideas for the community forums.  
    Posts that are looking for help or suggestions with queries relating to BT products and services should be posted in the most relevant categories – eg. Phone, Broadband, TV or Billing.  You may notice that if those queries get posted in the H&S board then the mods will move them to the most relevant board.
    What type of posts get moved from this board?
    Some of the posts the mods have to move from this board are related to email queries, PCs/hardware queries etc.  As these posts are all generally linked to broadband and your home PC then the best place to post this in is the ‘BB in the Home’ board.  The ‘BB out and about’ board focuses on BT Fon, BT Openzone, BT Mobile Broadband, and the BT Broadband Anywhere service. 
    If you are not sure where to post, read the list under each board title, this should help you choose where to post.  If you are unsure, make your best guess and the mods will move it if they need to.
    Thanks,
    Stephanie
    Stephanie
    BTCare Community Manager
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post. If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

    It is Prudent to purchase the Phone in the Country it is intended for use in... it will then work as expected.
    If you are attracted by the seemingly  Cheap   prices in the US... you are failing to take into account that you are probably looking at the phones that are LOCKED and CONTRACTED to a US Carrier.
    AND...
    iPhone Warranty  >  The warranty is only valid in the country of original purchase...
    Except if purchased in an EU Country...
    http://www.apple.com/uk/legal/statutory-warranty/

  • What type of Vista for Qosmia G30-194

    What type of Vista you advise to by installed on a G30-194: x86 or x64, because both works with this type of processor

    I agree with snipe. Who knows when the drivers for x64 will be available. It will be available one day but probably not in next few months.

  • What is the next step after editing or triming a video ? What type of file format to save and what to do after that ?

    what is the next step after editing or triming a video?
    what type of file format should be save and what to do after that?

    In the early days of digital video editing, an export render could take hours!  Not many applications are as hard on system resources as video editing, and rendering the final edit is probably the most system intense action of all.  
    Head on over to the Premiere Pro Hardware forum to see what sort of computer hardware the pros use for NLE (non linear editing), or to the PPBM5 site for a better look.
    PPBM5 Benchmark
    Also check out the specs on the Video Guys website

  • What type of wireless router is the 1st generation time capsule? Is it B, G or N. I'm trying to understand why our wifi signal is a bit erratic. Paul

    what type of wireless router is the 1st generation time capsule? Is it B, G or N? I'm trying to establish whether its causing signal degradation as a result of conflicts with my BT Home Hub router.

    The 1st generation Time Capsule is an 802.11"n" wireless router, but in default settings it produces a signal that is also compatible with "g" and "b" wireless devices.
    If your HomeHub is in close proximity to the Time Capsule and it is also producing a wireless network, either the wireless on the HomeHub or the TIme Capsule should be be disabled to minimize the chances of wireless interference.
    Interference may also be coming from any cordless phones you may have, or another nearby wireless network as well.

  • What type of adapter/ converter would I purchase from Apple if traveling to France? Does Apple even offer one?

    What type of adapter/ converter would I purchase from Apple if traveling to France? Does Apple even offer one?

    The power supplies used by Apple can be used with any line voltage between 100 and 240 volts so you done need any changes there.
    What you will need is pin adapters because the European socket require different shaped pins. You can get the pins adapters at any hardware store quite inexpensively.
    Read http://www.francetravelplanner.com/details/electric.html

  • How to find what type of middleware product we are using in SAP CRM ?

    Hello All,
    Ca anyone help me in getting the information  for the following :
    1) How to find out what type of middleware product we are using in our Project? ( Currently our SAP CRM version is 4.0 and the middleware is using for R/3 to SAP CRM and vice versa)
    2) Do we have a product called u201CMessaging wareu201D used in SAP ?
    Kindly revert at the earliest .
    Cheers
    Sreedhar

    Hi Sreedhar,
    What you've mentioned is exactly the task of CRM Middleware, which sits on the CRM server and governs the data flow.
    By any chance are you trying to find out about DOE(Data Orchestration Engine) used by SAP NetWeaver Mobile ?
    maybe this link would help then:
    http://help.sap.com/saphelp_nwmobile71/helpdata/en/7f/c9391404c74fabb8ccc321bac64e8d/content.htm
    -Rohit

Maybe you are looking for