Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EIS - Brio Javascript - Handling Errors

Status
Not open for further replies.

sharla724

Programmer
May 15, 2001
3
US
I am asking users to enter their Oracle User ID and Password into EIS Text Boxes and then connecting using the Connection object. If the user does not enter a correct login I want to be able to access the Oracle error message and display it with an alert, so that I can let then know that they don't have a proper login or that they need to re-enter it. The Connect method returns an object, so I can't use the return value. Any suggestions would be great.

Thanks,

Sharla
 
total guess here, but since noone else has suggested guess ill give it a go. :)

you'll probably have to do a try catch statement. here is my guess of what you will need
:label
try
{
send info to db for connection
connection.open
//hopefully returns an integer for not connected,
//if so you can handle it and try again, if not then
connection.move
//this should throw an error you can trap
}

catch(exception e)
{
//you can do general or specific here by error e

//general
alert("you fubared")
//goto label to try again

//specific
switch(e)
{
case #:
alert("error 1)
break
case #:
alert(error 2)
break
default:
do something
}


}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top