[great-users] Abort a transformation
Daniel Balasubramanian
daniel at isis.vanderbilt.edu
Wed Feb 23 15:34:52 CST 2011
Hi Achim,
> I'd like to indicate a fault, not return an empty model (which does not do any harm).
I didn't realize that you needed to indicate a fault. You are correct that GReAT doesn't have a first-class "exception" concept that you can define in a transformation.
> Probably I should throw an exception in the C++ code of an AttributeMapping, which will result in some sort of error message.
You could do that. You may also want to look into using a User-Code Library inside your transformation if there's a lot of computation you need to perform.
Cheers,
Daniel
-----Original Message-----
From: great-users-bounces at list.isis.vanderbilt.edu on behalf of Achim Gädke
Sent: Wed 2/23/2011 3:31 PM
To: great-users
Subject: Re: [great-users] Abort a transformation
On 24/02/11 08:32, Daniel Balasubramanian wrote:
> This implies that you have a way inside the transformation to test for the abort condition.
> The semantics of GReAT are that if you have a Rule that produces no output packets, then the transformation terminates.
>
Hi Daniel!
Well, we are in the middle of the "exception vs return value"
discussion, which is a quite old one...
I'd like to indicate a fault, not return an empty model (which does not
do any harm).
Probably I should throw an exception in the C++ code of an
AttributeMapping, which will result in some sort of error message.
Cheers, Achim
_______________________________________________
great-users mailing list
great-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
More information about the great-users
mailing list