Re: Differences w/ exception handling in Magritte..?

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

Re: Differences w/ exception handling in Magritte..?

Lukas Renggli-2
Where exactly do you get a recursion?

It looks like that this is exactly the point in time where I added  
code to avoid recursion when dealing with recursive descriptions. I  
guess the method causing trouble is  
MAValidatorVisitor>>#visitDescription:?

Lukas




On 12.07.2007, at 17:48, Rick Flower wrote:

>
> Lukas,
>
> I dropped a note to Thomas Koschate, who did the first ports of  
> Magritte
> over to VW, asking about moving the current version of Magritte  
> over to VW
> in the hopes of having something to use w/ Seaside 2.7 or 2.8a  
> (instead of
> 2.6).. Anyway, he indicated that he had tried porting over
> Magritte-all-lr.224 last month but ran into an issue w/ infinite  
> recursion
> as part of some perceived exception handling changes.. Anyway, do  
> you know
> off the top of your head if anything changed between versions 192/193
> (from Feb 16th, 2007) and 224 in how exception handling is dealt  
> with in
> Magritte?  I've not had a chance to look into it yet after his latest
> comments early this morning (I don't have VW/Squeak at work).  Anyway,
> just thought I'd ask.. Thanks!
>
> -- Rick
>
>
>

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Differences w/ exception handling in Magritte..?

Rick Flower
On Thu, July 12, 2007 9:15 am, Lukas Renggli wrote:
> Where exactly do you get a recursion?
>
> It looks like that this is exactly the point in time where I added
> code to avoid recursion when dealing with recursive descriptions. I
> guess the method causing trouble is
> MAValidatorVisitor>>#visitDescription:?

I'm not sure exactly -- I'll have to load it to find out -- I'll get back
to you with some more details.. Thanks for the heads-up though -- at least
it's a place to start looking.




_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Differences w/ exception handling in Magritte..?

Thomas Koschate-2
In reply to this post by Lukas Renggli-2

On 7/12/07, Lukas Renggli <[hidden email]> wrote:
Where exactly do you get a recursion?

It looks like that this is exactly the point in time where I added
code to avoid recursion when dealing with recursive descriptions. I
guess the method causing trouble is
MAValidatorVisitor>>#visitDescription:?

That's exactly the spot.  The #resignalAs: is causing VW some heartburn.

--
============================================================
Thomas Koschate


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Differences w/ exception handling in Magritte..?

Lukas Renggli-2
> That's exactly the spot.  The #resignalAs: is causing VW some  
> heartburn.

I don't exactly remember why I copy the exception there. That seems  
rather strange and presumably causes VW to end up in an infinite  
recursion.

Please try with the following code that works -- as far as I can see  
right now -- well in Squeak:

visitDescription: aDescription
        "Validate the current object using aDescription within an exception  
handler to avoid running further tests that might cause error-cascades."

        aDescription isVisible ifFalse: [ ^ self ].
        [ self validate: self object using: aDescription ]
                on: MAValidationError
                do: [ :err | err beResumable; pass ]

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Differences w/ exception handling in Magritte..?

Lukas Renggli-2
In reply to this post by Thomas Koschate-2
Name: Magritte-All-lr.226
Author: lr
Time: 12 July 2007, 7:22:28 pm
UUID: 72307372-3019-412b-94df-ab0524468fca
Ancestors: Magritte-All-lr.225
Dependencies: Magritte-Model-lr.271, Magritte-Tests-lr.115, Magritte-
Seaside-lr.232, Magritte-Morph-lr.38

- trying to improve the way resumeable errors are thrown, so that it  
works on VW as well
- added tests to exactly check the way resumeable errors are handled

On 12.07.2007, at 18:35, Thomas Koschate wrote:

>
> On 7/12/07, Lukas Renggli <[hidden email]> wrote: Where  
> exactly do you get a recursion?
>
> It looks like that this is exactly the point in time where I added
> code to avoid recursion when dealing with recursive descriptions. I
> guess the method causing trouble is
> MAValidatorVisitor>>#visitDescription:?
>
> That's exactly the spot.  The #resignalAs: is causing VW some  
> heartburn.
>
> --
> ============================================================
> Thomas Koschate
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Differences w/ exception handling in Magritte..?

Thomas Koschate-2
In reply to this post by Lukas Renggli-2


On 7/12/07, Lukas Renggli <[hidden email]> wrote:
Please try with the following code that works -- as far as I can see
right now -- well in Squeak:

visitDescription: aDescription

That solves the problem nicely for that one.  However, we run into the same issue with MAStringReader>>#visitElementDescription:.  Morever, there's actually a bug with this method, since #resignalAs: is expecting an instance of an exception, and you're passing in a class.

While I remember, a request to help with future ports:  Please avoid the use of {} to define arrays, as VisualWorks doesn't know how to deal with this.
--
============================================================
Thomas Koschate


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Differences w/ exception handling in Magritte..?

Lukas Renggli-2
> That solves the problem nicely for that one.  However, we run into  
> the same issue with MAStringReader>>#visitElementDescription:.  
> Morever, there's actually a bug with this method, since  
> #resignalAs: is expecting an instance of an exception, and you're  
> passing in a class.

In Squeak a class and an instance works. I fixed that to create a new  
instance instead.

> While I remember, a request to help with future ports:  Please  
> avoid the use of {} to define arrays, as VisualWorks doesn't know  
> how to deal with this.

I found one occurrence in a test. Are there others?

The problems are fixed:

Name: Magritte-All-lr.227
Author: lr
Time: 12 July 2007, 9:08:32 pm
UUID: eadc01b1-8663-4f91-8acc-c67a30f133d4
Ancestors: Magritte-All-lr.226
Dependencies: Magritte-Model-lr.272, Magritte-Tests-lr.116, Magritte-
Seaside-lr.232, Magritte-Morph-lr.38

- for platform compatibility:
        - create an instance for #resignalAl:
        - removed single use of {} in test

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Differences w/ exception handling in Magritte..?

Thomas Koschate-2


On 7/12/07, Lukas Renggli <[hidden email]> wrote:

In Squeak a class and an instance works. I fixed that to create a new
instance instead.

 I'm sorry, I may not have made myself understood.  The infinite recursion error occurs as a result of the #resignalAs:, even if an instance is correctly supplied.

I found one occurrence in a test. Are there others?

No, it was only the one occurrence.

Thanks for the quick turnaround!
--
============================================================
Thomas Koschate                              +1 416.716.5949
[hidden email]                    FAX:  +1 905.451.9268


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Differences w/ exception handling in Magritte..?

Lukas Renggli-2
Ok, no more senders of #resignalAl: in

Name: Magritte-All-lr.228
Author: lr
Time: 12 July 2007, 9:50:42 pm
UUID: d7bdc877-4341-4986-8a7d-810edd165050
Ancestors: Magritte-All-lr.227
Dependencies: Magritte-Model-lr.273, Magritte-Tests-lr.116, Magritte-
Seaside-lr.232, Magritte-Morph-lr.38

- avoid another infinite look with #resignalAs:


On 12.07.2007, at 21:23, Thomas Koschate wrote:

>
>
> On 7/12/07, Lukas Renggli <[hidden email]> wrote:
>
> In Squeak a class and an instance works. I fixed that to create a new
> instance instead.
>
>  I'm sorry, I may not have made myself understood.  The infinite  
> recursion error occurs as a result of the #resignalAs:, even if an  
> instance is correctly supplied.
>
> I found one occurrence in a test. Are there others?
>
> No, it was only the one occurrence.
>
> Thanks for the quick turnaround!
> --
> ============================================================
> Thomas Koschate                              +1 416.716.5949
> [hidden email]                    FAX:  +1 905.451.9268

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Differences w/ exception handling in Magritte..?

Thomas Koschate-2
On 7/12/07, Lukas Renggli <[hidden email]> wrote:
Ok, no more senders of #resignalAl: in

We're getting close now.  I just need to work through a few more Squeak/VW dialect differences and we'll be up to date again.
--
============================================================
Thomas Koschate                              +1 416.716.5949
[hidden email]                    FAX:  +1 905.451.9268


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki