Handling errors during project/version creation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Handling errors during project/version creation

Dale Henrichs
Historically configurations that contained outright errors in one or
more version specifications "poisoned the whole configuration" by
making it impossible to do anything with a configuration that had
specification errors even when a version that you were not interested
in was causing the error ...

As part of the fix for Issue 119[1], I have added code to allow
configurations to complete their creation even when one or more
versions contain execution errors ... If one attempts to access a
version that was not created because of errors (by sending #version:),
then a MetacelloVersionDefinitionError (a kindOf:
MetacelloVersionDoesNotExistError) is thrown that includes a reference
to the exception that caused the original error so you can get a
better understanding of why "the version does not exist".

For folks writing tools, you can use code like the following:

  [ConfigurationOfExample project ]
        on: MetacelloErrorInProjectConstructionNotification
        do: [:ex | ex resume: true ].

to "unmask the error" as resuming a
MetacelloErrorInProjectConstructionNotification with true will result
in the exception being thrown inline ...

I've also added a new validation reasonCode (#'versionCreationError')
to handle the cases when an error is thrown during version creation.

With these "deferred errors" I think that Metacello will be a little
more stable in the face of incorrect configurations.

For folks that would like to play with this new feature, I encourage
you to load Metacello 1.0-beta.32 (dkh.668) and let me know what you
think. You can look at the tests in the class
MetacelloIssue119TestCase for examples. Of course if you find some
cases that aren't covered, then I am also interested.

Dale

[1] http://code.google.com/p/metacello/issues/detail?id=119
Reply | Threaded
Open this post in threaded view
|

Re: Handling errors during project/version creation

Tudor Girba-2
Excellent!

This was highly needed :)

Cheers,
Doru


On 21 Jan 2012, at 02:06, Dale wrote:

> Historically configurations that contained outright errors in one or
> more version specifications "poisoned the whole configuration" by
> making it impossible to do anything with a configuration that had
> specification errors even when a version that you were not interested
> in was causing the error ...
>
> As part of the fix for Issue 119[1], I have added code to allow
> configurations to complete their creation even when one or more
> versions contain execution errors ... If one attempts to access a
> version that was not created because of errors (by sending #version:),
> then a MetacelloVersionDefinitionError (a kindOf:
> MetacelloVersionDoesNotExistError) is thrown that includes a reference
> to the exception that caused the original error so you can get a
> better understanding of why "the version does not exist".
>
> For folks writing tools, you can use code like the following:
>
>  [ConfigurationOfExample project ]
> on: MetacelloErrorInProjectConstructionNotification
> do: [:ex | ex resume: true ].
>
> to "unmask the error" as resuming a
> MetacelloErrorInProjectConstructionNotification with true will result
> in the exception being thrown inline ...
>
> I've also added a new validation reasonCode (#'versionCreationError')
> to handle the cases when an error is thrown during version creation.
>
> With these "deferred errors" I think that Metacello will be a little
> more stable in the face of incorrect configurations.
>
> For folks that would like to play with this new feature, I encourage
> you to load Metacello 1.0-beta.32 (dkh.668) and let me know what you
> think. You can look at the tests in the class
> MetacelloIssue119TestCase for examples. Of course if you find some
> cases that aren't covered, then I am also interested.
>
> Dale
>
> [1] http://code.google.com/p/metacello/issues/detail?id=119

--
www.tudorgirba.com

"Don't give to get. Just give."





Reply | Threaded
Open this post in threaded view
|

Re: Handling errors during project/version creation

Dale Henrichs
Haha, I was thinking of you Doru:)

Dale

----- Original Message -----
| From: "Tudor Girba" <[hidden email]>
| To: [hidden email]
| Sent: Friday, January 20, 2012 11:28:05 PM
| Subject: Re: [Metacello] Handling errors during project/version creation
|
| Excellent!
|
| This was highly needed :)
|
| Cheers,
| Doru
|
|
| On 21 Jan 2012, at 02:06, Dale wrote:
|
| > Historically configurations that contained outright errors in one
| > or
| > more version specifications "poisoned the whole configuration" by
| > making it impossible to do anything with a configuration that had
| > specification errors even when a version that you were not
| > interested
| > in was causing the error ...
| >
| > As part of the fix for Issue 119[1], I have added code to allow
| > configurations to complete their creation even when one or more
| > versions contain execution errors ... If one attempts to access a
| > version that was not created because of errors (by sending
| > #version:),
| > then a MetacelloVersionDefinitionError (a kindOf:
| > MetacelloVersionDoesNotExistError) is thrown that includes a
| > reference
| > to the exception that caused the original error so you can get a
| > better understanding of why "the version does not exist".
| >
| > For folks writing tools, you can use code like the following:
| >
| >  [ConfigurationOfExample project ]
| > on: MetacelloErrorInProjectConstructionNotification
| > do: [:ex | ex resume: true ].
| >
| > to "unmask the error" as resuming a
| > MetacelloErrorInProjectConstructionNotification with true will
| > result
| > in the exception being thrown inline ...
| >
| > I've also added a new validation reasonCode
| > (#'versionCreationError')
| > to handle the cases when an error is thrown during version
| > creation.
| >
| > With these "deferred errors" I think that Metacello will be a
| > little
| > more stable in the face of incorrect configurations.
| >
| > For folks that would like to play with this new feature, I
| > encourage
| > you to load Metacello 1.0-beta.32 (dkh.668) and let me know what
| > you
| > think. You can look at the tests in the class
| > MetacelloIssue119TestCase for examples. Of course if you find some
| > cases that aren't covered, then I am also interested.
| >
| > Dale
| >
| > [1] http://code.google.com/p/metacello/issues/detail?id=119
|
| --
| www.tudorgirba.com
|
| "Don't give to get. Just give."
|
|
|
|
|
|