Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Suppressing error messages from a database procedure.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Martin Bowes  
View profile  
 More options Jan 20, 4:51 am
Newsgroups: comp.databases.ingres
From: Martin Bowes <martin.bo...@ctsu.ox.ac.uk>
Date: Fri, 20 Jan 2012 09:51:00 +0000
Subject: [Info-Ingres] Suppressing error messages from a database procedure.

Hi All,

Given a directly executed procedure has a possibility of executing code which will cause an error, how do I suppress the error message?

I still want to trap the error code, but I want to totally handle everything that ensues from the error point.

Example:
create procedure trial_date_cast(
    a_string varchar(40) not null not default
)
as declare
    int_date ingresdate not null not default;
begin
    int_date = date(:a_string);
    return iierrornumber;
end;

If I then execute procedure trial_date_cast(a_string = 'not a date')\g
Executing . . .

E_US10CE 'not a date' is not a valid date/time value.

Ideas?

Martin Bowes


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roy Hann  
View profile  
 More options Jan 20, 5:47 am
Newsgroups: comp.databases.ingres
From: Roy Hann <specia...@processed.almost.meat>
Date: Fri, 20 Jan 2012 10:47:52 +0000 (UTC)
Local: Fri, Jan 20 2012 5:47 am
Subject: Re: [Info-Ingres] Suppressing error messages from a database procedure.

Did we not go over very similar ground in the "Error handling in DBPs"
thread I started on October 17 2005?

Contrary to what the documentation seemed to say (then), there are some
errors that terminate the DBP before it can catch and handle the
error.  I don't think we ever came up with an explanation nor a
workaround.

The example in that thread was divide-by-zero.

--
Roy

UK Ingres User Association Conference 2012 will be on Tuesday June 19 2012.  
The latest information is available from www.uk-iua.org.uk.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »