On Missing Class: Why not describe error?

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

On Missing Class: Why not describe error?

Sean P. DeNigris
Administrator
Current implementation:
    MethodDeclaration>>#handleMissingBehavior
        "self error: ('Cannot install method in unexistent behavior {1}' format: {(behaviorName asString)})"
       
        (MissingClassError
                className: behaviorName asString)
                signal

Any reason not to make it:
    MethodDeclaration>>#handleMissingBehavior
       
        (MissingClassError
                className: behaviorName asString)
                signal: 'Cannot install method in unexistent behavior', behaviorName asString
?

It seems so obvious that I'm sure I must be missing something important!
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: On Missing Class: Why not describe error?

Damien Pollet
Same for methods with syntax errors. A stub method could be installed instead… either an actual method with the incorrect source code as a comment, or a dedicated method-like object.

On 11 May 2015 at 14:40, Sean P. DeNigris <[hidden email]> wrote:
Current implementation:
    MethodDeclaration>>#handleMissingBehavior
        "self error: ('Cannot install method in unexistent behavior {1}' format:
{(behaviorName asString)})"

        (MissingClassError
                className: behaviorName asString)
                signal

Any reason not to make it:
    MethodDeclaration>>#handleMissingBehavior

        (MissingClassError
                className: behaviorName asString)
                signal: 'Cannot install method in unexistent behavior', behaviorName
asString
?

It seems so obvious that I'm sure I must be missing something important!



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/On-Missing-Class-Why-not-describe-error-tp4825681.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.




--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet
Reply | Threaded
Open this post in threaded view
|

Re: On Missing Class: Why not describe error?

stepharo
In reply to this post by Sean P. DeNigris
Yes
It was on my to do to create a little addd-ons that create stupid stub
classes.
so that I can load broken code and do not care.

Le 11/5/15 14:40, Sean P. DeNigris a écrit :

> Current implementation:
>      MethodDeclaration>>#handleMissingBehavior
> "self error: ('Cannot install method in unexistent behavior {1}' format:
> {(behaviorName asString)})"
>
> (MissingClassError
> className: behaviorName asString)
> signal
>
> Any reason not to make it:
>      MethodDeclaration>>#handleMissingBehavior
>
> (MissingClassError
> className: behaviorName asString)
> signal: 'Cannot install method in unexistent behavior', behaviorName
> asString
> ?
>
> It seems so obvious that I'm sure I must be missing something important!
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/On-Missing-Class-Why-not-describe-error-tp4825681.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: On Missing Class: Why not describe error?

Sean P. DeNigris
Administrator
In reply to this post by Sean P. DeNigris
Sean P. DeNigris wrote
Any reason not to make it...
Issue 15524: CodeImport: Better info on non-existent behavior
https://pharo.fogbugz.com/default.asp?15524

Fix in inbox: SLICE-Issue-15524-CodeImport-Better-info-on-non-existent-behavior-SeanDeNigris.1

- Put which class and which label in the error message
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: On Missing Class: Why not describe error?

Damien Pollet
I just faced that trying to load variableByteSubclasses of NBExternalStruct… somehow I managed to not immediately give up with the whole thing… but seriously this is a real efficient way to instantly reach my frustration limit.

On 11 May 2015 at 21:59, Sean P. DeNigris <[hidden email]> wrote:
Sean P. DeNigris wrote
> Any reason not to make it...

Issue 15524: CodeImport: Better info on non-existent behavior
https://pharo.fogbugz.com/default.asp?15524

Fix in inbox:
SLICE-Issue-15524-CodeImport-Better-info-on-non-existent-behavior-SeanDeNigris.1

- Put which class and which label in the error message



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/On-Missing-Class-Why-not-describe-error-tp4825681p4825873.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.




--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet
Reply | Threaded
Open this post in threaded view
|

Re: On Missing Class: Why not describe error?

stepharo
So why don't you propose a solution?

Stef

Le 12/5/15 14:50, Damien Pollet a écrit :
I just faced that trying to load variableByteSubclasses of NBExternalStruct… somehow I managed to not immediately give up with the whole thing… but seriously this is a real efficient way to instantly reach my frustration limit.

On 11 May 2015 at 21:59, Sean P. DeNigris <[hidden email]> wrote:
Sean P. DeNigris wrote
> Any reason not to make it...

Issue 15524: CodeImport: Better info on non-existent behavior
https://pharo.fogbugz.com/default.asp?15524

Fix in inbox:
SLICE-Issue-15524-CodeImport-Better-info-on-non-existent-behavior-SeanDeNigris.1

- Put which class and which label in the error message



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/On-Missing-Class-Why-not-describe-error-tp4825681p4825873.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.




--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet