[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: rdoc, api + exceptions

Gennady Bystritsky

1/19/2006 4:43:00 PM

Create explicit test cases where you demonstrate (and check, of course)
in what circumstances your class can generate custom exceptions. Refer
to them from your documentation.

Gennady.

-----Original Message-----
From: Jon Baer [mailto:jonbaer@jonbaer.com]
Sent: Thursday, January 19, 2006 8:27
To: ruby-talk ML
Subject: rdoc, api + exceptions

Hi,

Ive become a pretty big fan of Ruby in the past month during my time off
and while going through PickAxe book and looking around Im not sure if
im missing something fundamental about exceptions ... (bare w/ me as I
am a Java/PHP convert)

Normally when developing an API you can express what exceptions may
occur when invoking a particular method ...

public foobar() throws BadFooBarException

In Ruby, it would seem to me that nearly ~everything~ can throw at least
one exception (or at least cause NameError), so Im wondering at least
how you would document that your method should be placed in a
begin/rescue/end block from a custom exception.

Thanks!

- Jon



14 Answers

<Kelly>

7/29/2008 11:37:00 PM

0

On Jul 29, 4:11 pm, john w <j<no>@yahoo.com> wrote:

>    I have worked in technology as a writer (technical writer) most of
> my adult life.

Isn't it actually true that you have been unemployed and/or on the
public dole most of your adult life?

> There was ALWAYS a contract to be signed; employers
> like Microsoft required a "Non-Disclosure."
>
>   And the employer typically doesn't think that their rules are
> "silly."
>
>   I was thought to be silly because I refused to sign-- and then
> violate-- a written agreement.

Is that why you have been fired and kicked out of school and
dishonorably discharged over and over again?

>   Mark knew the rules when he signed on.
>
>   Mark signed on and then CHOSE to violate rules he knew existed
> beforehand.

Projecting about your own past employment experiences again?

>   You now seem to be justifying his EXTREME behavior.

Like you justify your extreme behavior? Or Vera's extreme behavior?

>    He considers himself a Christian, but he DESPISES anyone who
> disagrees with his EXTREME views.

More projecting.

>   When he gets himself in line, when he deals with his rage issues,
> I'll reconsider.

It's all about you, isn't it, John?

>    I have been known to apologize in the past.

You left out the part where you then turn right back around and behave
the way you did before the apology. Then there are the times you will
apologize, say you want to start over and turn back around and welch
on your resolve.

All of your apologies and reconciliations are nothing but exercises in
demonstrating that everything you are about is only one thing:

You.

john w

7/29/2008 11:40:00 PM

0

x-no-archive: yes
On Tue, 29 Jul 2008 11:04:35 -0400, NOSPAM <nospam@nospam> wrote:
? 2008 John D Weatherly all rights reserved; no portion of this post
may be used anywhere else without written permission of the author.
>On Mon, 28 Jul 2008 23:23:14 -0700, john w <j<no>@yahoo.com> wrote:
>
>>
>> The FACT is, Satan, that you REFUSE TO SUBMIT.
>
>
>Hey, short bus --- I thought you claimed 'you never call other people
>Satan' ???
>
>Just another lie on your part, huh?

"Another lie..."? Unlike you, I'm not in the habit of lying.

And you really ought to repost the quote in which I said "I never
call other people "Satan."" That's not what I said.

You also missed the apology I extended Mark.

You seem to want consideration; but you don't seem to ever offer
any!





john w

7/29/2008 11:43:00 PM

0

x-no-archive: yes
On Tue, 29 Jul 2008 19:10:05 +1000, "Mark T"
<snailmail@letterbox987654321> wrote:
? 2008 John D Weatherly all rights reserved; no portion of this post
may be used anywhere else without written permission of the author.
>John D Weatherly of Seattle Washingtton "john w @yahoo.com>" <j<no> wroteth:
>
>>>> regardless of one's personal views, one must be
>>>> respectful of the views of those in Authority over you
>>>Naughty bad Christian pastor Dietrich Bonhoeffer who was in a plot to >>
>>>KILL the Austhority over him - Adolf Hitler.
>>>
>>>The bible you call "God's Word" states ...........
>>>#######################################################
>>>Jesus said in Matthew 5:42, "Give to him that asketh thee, and from
>>>him that would borrow of thee turn not thou away." May I have your house
>>>and car and may I borrow your most prized possession?
>>>########################################################
>>>BUT YOU DON'T FOLLOW THE BIBLE IN THIS MATTER!!!!!
>>
>> You are a liar
>
>
>So when can I have your house, car and most prized possession?

I'm going to apologize for calling you "Satan."

I think you're more probably a demon.

You are least a very twisted, very angry person, dying in RAGE.

I'll pray for you.

But I won't put up with your trash talk.

>
>
>
>> I don't own a house, and I don't own a car.
>
>I'll have your trailer and bicycle then.
>
>
>> And "my most prized possessions" are part of my livelihood.
>
>Oh ... your Jesus comic books. I'll have them too. I can start a BBQ with
>'em.
>
>
>--
>DISTINGUISHING FEATURES OF A CHRISTUS OBNOXIUM
>
>... quoting from James Barr's book "Fundamentalism" on the three
>distinguishing features of the Fundamentalist:
>
>'Firstly, a fundamentalist has a very strong emphasis on the inerrancy of
>the Bible, and believes in the absence from it of any sort of error.
>
>Two, a strong hostility to modern theology and to the method, results and
>implications of modern critical study of the Bible.
>
>And three, an assurance that those who do not share their religious
>viewpoint are not really true Christians at all.'
>
>Peter Cameron "Heretic" (Doubleday; Sydney: 1994) p. 178

john w

7/29/2008 11:45:00 PM

0

x-no-archive: yes
On Tue, 29 Jul 2008 14:12:03 -0700, "Chuck Stamford"
<shell-stamford@cox.net> wrote:
? 2008 John D Weatherly all rights reserved; no portion of this post
may be used anywhere else without written permission of the author.
>
>"<Kelly>" <316kcbk@gmail.com> wrote in message
>news:593d8640-8170-48a4-8f84-21efc8848137@v39g2000pro.googlegroups.com...
>> On Jul 29, 5:25 am, john w <j<no>@yahoo.com> wrote:
>>
>>> On Tue, 29 Jul 2008 19:10:05 +1000, "Mark
>>> T"<snailmail@letterbox987654321> wrote:
>>
>>> >>John D Weatherly of Seattle Washingtton "john w @yahoo.com>" <j<no>
>>> >>wroteth:
>>
>>> >> I don't own a house, and I don't own a car.
>>
>>> >I'll have your trailer and bicycle then.
>>
>>> Come and get them and I'll introduce you to my 12 gauge.
>>
>> <----------------------------------A R C H I V E
>> D-------------------------------------->
>>
>> Real smart, Einstein. You've just stated you have a firearm in your
>> posession (you are prohibited from owning one) and you threatened
>> someone's life with it.
>>
>> This post will also be archived in full, ignoring John D. Weatherly of
>> Seattle, Washington's worthless "copyright" notice.
>
>Never heard of the 2nd Amendment?

Hey, Stupid! Chuck !! (kidding)

The 2nd Amendment doesn't apply to anyone Elaine or Kelly (Elaine
II) don't like.

You're supposed to know that!

>: (
>

Dr. House

7/29/2008 11:49:00 PM

0

On Jul 29, 4:11 pm, john w <j<no>@yahoo.com> wrote:

[...]
>   You now seem to be justifying his EXTREME behavior.

No, I was making fun of yours. I don't justify Mark's behavior at
all.

>
>    He considers himself a Christian, but he DESPISES anyone who
> disagrees with his EXTREME views.
>
>   I disagree with his extreme views, and he despises me.

Maybe he despises you because you believe he is a specific spiritual
being - Satan himself. You are in no position to talk about extreme
views. Really, you could get 51/50 for that.


[...]
>   You need to rethink your defending Mark.

I _don't_ defend Mark. All I ask is that people not use his dead
loved ones in order to hurt him or pretend their revenge is in the
name of Christianity.


House

<Kelly>

7/29/2008 11:51:00 PM

0

On Jul 29, 4:43 pm, john w <j<no>@yahoo.com> wrote:

>    I was being facetious, stupid person.

Since the definition of facetious is "joking or jesting often
inappropriately", then yes, I believe you when you say you were being
facetious, John. Your "humor" is often quite inappropriate.

Doesn't matter, though - law enforcement tends to take the threat of
armed violence very, very seriously.

ujb

7/30/2008 12:19:00 AM

0

john w <j wrote:
> x-no-archive: yes
> On Tue, 29 Jul 2008 11:04:35 -0400, NOSPAM <nospam@nospam> wrote:
> ? 2008 John D Weatherly all rights reserved; no portion of this post
> may be used anywhere else without written permission of the author.
>> On Mon, 28 Jul 2008 23:23:14 -0700, john w <j<no>@yahoo.com> wrote:
>>
>>> The FACT is, Satan, that you REFUSE TO SUBMIT.
>>
>> Hey, short bus --- I thought you claimed 'you never call other people
>> Satan' ???
>>
>> Just another lie on your part, huh?
>
> "Another lie..."? Unlike you, I'm not in the habit of lying.

everyone knows who liar johnnie is!

> And you really ought to repost the quote in which I said "I never
> call other people "Satan."" That's not what I said.
>
> You also missed the apology I extended Mark.
>
> You seem to want consideration; but you don't seem to ever offer
> any!
>
>
>
>
>

CB

7/30/2008 1:20:00 AM

0

On Tue, 29 Jul 2008 04:48:26 -0700, john w <j<no>@yahoo.com> wrote:

>^ ^ ^^ (my lie for the week)

So you admit you're a liar.

<Kelly>

7/30/2008 2:49:00 AM

0

On Jul 29, 7:40 pm, john w <j<no>@yahoo.com> wrote:

> >> I was being facetious, stupid person.

> >Since the definition of facetious is "joking or jesting often
> >inappropriately", then yes, I believe you when you say you were being
> >facetious, John.  Your "humor" is often quite inappropriate.

I notice you skipped the above.

> >Doesn't matter, though - law enforcement tends to take the threat of
> >armed violence very, very seriously.

>   One "very" is sufficient. But then, you ARE known for excess.

Actually, using two is quite acceptable. More than that would be
excessive (like the number of exclamation points you misuse in most of
your posts).

>   And if some jerk comes to my home unannounced, I plan to defend
> myself, whether YOU like it or not.
>
>   Is THAT very clear?

Not really. Could you repeat that, please? Maybe be a little more
specific and succinct this time?

Chuck Stamford

7/30/2008 5:18:00 AM

0


"<Kelly>" <316kcbk@gmail.com> wrote in message
news:b8378186-cf4e-497d-97e8-bb785c52a90a@i24g2000prf.googlegroups.com...
On Jul 29, 2:12 pm, "Chuck Stamford" <shell-stamf...@cox.net> wrote:

> Never heard of the 2nd Amendment?

Of course I have. It doesn't apply, however, to John Weatherly since
he is prohibited from owning and/or carrying any firearm.

Chuck:

So what are you saying? That John is a convicted felon?