Question about primitives

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

Question about primitives

Vitor Medina Cruz
Hello,

What is the correct behavior of a primitive when it fails? I should throw a specific Exception or do something else?

[]s,
Vitor

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Question about primitives

James Ladd
What would Pharo/Squeak do?

Sent from Hyperspace.

On 5 Nov 2013, at 10:54 am, Vitor Cruz <[hidden email]> wrote:

Hello,

What is the correct behavior of a primitive when it fails? I should throw a specific Exception or do something else?

[]s,
Vitor

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Question about primitives

Vitor Medina Cruz
Call the method associated with the selector as if there is no primitive, right? But I want to know if I do that inside the primitive java method from ProtoObject or if that method should signal somehow (with an exception?) that the primitive failed leaving another part of the code to call the method associated with the selector. I could not figure that out looking at the ProtoObject primitive implementation and tests.


On Mon, Nov 4, 2013 at 11:04 PM, James Ladd <[hidden email]> wrote:
What would Pharo/Squeak do?

Sent from Hyperspace.

On 5 Nov 2013, at 10:54 am, Vitor Cruz <[hidden email]> wrote:

Hello,

What is the correct behavior of a primitive when it fails? I should throw a specific Exception or do something else?

[]s,
Vitor

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Question about primitives

James Ladd
When a primitive fails the 'primitiveFailed' message should be sent to the receiver. I could be wrong about that selector and will have to look it up in Pharo. 

I have been away from the core of Redline for a while and I'm rather busy today - I will try and get back to you w more detail ASAP.

- James 

Sent from Hyperspace.

On 5 Nov 2013, at 10:25 pm, Vitor Medina Cruz <[hidden email]> wrote:

Call the method associated with the selector as if there is no primitive, right? But I want to know if I do that inside the primitive java method from ProtoObject or if that method should signal somehow (with an exception?) that the primitive failed leaving another part of the code to call the method associated with the selector. I could not figure that out looking at the ProtoObject primitive implementation and tests.


On Mon, Nov 4, 2013 at 11:04 PM, James Ladd <[hidden email]> wrote:
What would Pharo/Squeak do?

Sent from Hyperspace.

On 5 Nov 2013, at 10:54 am, Vitor Cruz <[hidden email]> wrote:

Hello,

What is the correct behavior of a primitive when it fails? I should throw a specific Exception or do something else?

[]s,
Vitor

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Question about primitives

baulamon
In reply to this post by Vitor Medina Cruz
Hello,

What is the correct behavior of a primitive when it fails? I should throw a specific Exception or do something.