From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,699cc914522aa7c4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Structured exception information From: Georg Bauhaus In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1168958752.2218.113.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Date: Tue, 16 Jan 2007 15:45:52 +0100 NNTP-Posting-Date: 16 Jan 2007 15:43:46 CET NNTP-Posting-Host: 126e9156.newsspool1.arcor-online.net X-Trace: DXC=9eS93`@CmZXFm0Y?OE@2^Xic==]BZ:af^4Fo<]lROoRQ^YC2XCjHcbY9FB\E_9=EWVN[W On Tue, 2007-01-16 at 15:33 +0100, Maciej Sobczak wrote: > Imagine a constructor function that calls a database or a script engine > with the query/script provided as a parameter. Some error can result and > I want to raise an exception. The handler might benefit (even if for the > purpose of presenting a nice error pop-up message) from: > > - error code > - error message > - line number > - character position > - hint from the engine > - timestamp from within the engine > - ... This looks like a rich and controlled message passing to me. Maybe an alternative design will handle the DB exceptions locally, and then have two task rendevouz: a DB_Service task, and a UI task. The latter will accept and entry called "throw" with a parameter of a type that reflects the list above. :-)