A style of imparting the desired combination of position, velocity, attitude, and angular momentum to a disc. Common throws useful in Ultimate are:


A mastery of each throw is essential to becoming a respected member of the Ultimate community.

Throw

(Programming::C++ term)

See Also: try, catch, exception

Note: Please read try and catch before reading this!

In the C++ programming language, the throw keyword can be used to raise an exception. If you are not already familiar with the concepts of a try and catch block, I encourage you to refer to those nodes first before continuing here. With that settled, let us evaluate the throw keyword in better detail:

The throw keyword is usually used in try blocks to throw an exception. The thrown exception can be anything from an invalid memory access function call to a user-defined safety condition.

Some exceptions that come with the ANSI/ISO Standard C++ Library include:

  • bad_alloc - This is thrown when an attempt to use the new operator fails. This commonly means that an error occured while trying to allocate memory that was unavailable.
  • bad_typeid - This is thrown when an error occurs during a typeid statement. This can mean that the program was unable to "type" the variable.
  • bad_cast - This is thrown when an error occurs during a cast from one type to another. This commonly happens in invalid dynamic_cast statements, but can also be thrown during other casts.
  • out_of_range - This is thrown when a functions argument was not within a specified range. This is not a common exception. This can happen when you attempt to mix types via casts.
  • invalid_argument - This is thrown when an invalid argument is given to a function. This is rare and can be avoided by specifying exactly what arguments you want a function to take, rather than being ambiguous.
  • length_error - This is thrown when an object you attempted to create was too large. If you feel that a certain class or object is rather big, you should use the new operator to dynamically allocate space for it.
  • overflow_error - This is thrown when an overflow occurs in arithmetic expressions and statements. Proper logic can prevent this.
  • underflow_error - This is thrown when an underflow occurs in arithmetic expressions and statemts. Proper logic can prevent this.
  • range_error - This is thrown when a specified range of an object is not valid. This commonly occurs in trying to assign values to objects that are too small to contain them. If an int object assignment is throwing this exception, try using a larger object (i.e. a double long).

Many more exceptions are defined that you are allowed to throw, but these are the most common. Refer to your compiler's documentation for more exceptions available to you.

Most of the exceptions listed above are thrown by C++ Standard Library classes and function calls. You will probably never need to throw most of them, but you may need to catch them.

You do not always have to throw a specific object or class. You can throw any value you wish and catch it with a catch block. An example of using a primitive int object:

    #include <iostream>
    using std::cout;

    int main(int argc, char **argv){

        // The try block needed to throw the variable
        try {
            cout << "I am going to throw the number 13 at you!\n";
            // Throw a value. In this case, it's the value 13
            throw (13);
            }

        // Now catch the value
        catch (int errorCode) {
            cout << "I caught It! The value is: " << errorCode;
            // Exit with an error status ( return (1) )
            return(1);
            }

        // The execution should not reach this point!
        cout << "What number? I didn't catch any damn number!\n";
        // Return successfully ( return(0) )
        return(0);
        }


Your output from this program should read:

I am going to throw the number 13 at you!
I caught It! The value is: 13

Two header files you should be aware of are stdexcept and exception. The exception header defines the base class exception from which all other exceptions are derived (see inheritance). These two header files declare the exceptions listed above (as well as others) and some functions. The functions are:

Throw (thrO), n. [See Throe.]

Pain; especially, pain of travail; throe. [Obs.] Spenser. Dryden.

 

© Webster 1913


Throw, n. [AS. þrAh, þrAg.]

Time; while; space of time; moment; trice. [Obs.] Shak.

I will with Thomas speak a little throw.
Chaucer.

 

© Webster 1913


Throw, v. t. [imp. Threw (thr&udd;); p. p. Thrown (thrOn); p. pr. & vb. n. Throwing.] [OE. þrowen, þrawen, to throw, to twist, AS. þrAwan to twist, to whirl; akin to D. draaijen, G. drehen, OHG. drAjan, L. terebra an auger, gimlet, Gr. &?; to bore, to turn, &?; to pierce, &?; a hole. Cf. Thread, Trite, Turn, v. t.]

1.

To fling, cast, or hurl with a certain whirling motion of the arm, to throw a ball; -- distinguished from to toss, or to bowl.

2.

To fling or cast in any manner; to drive to a distance from the hand or from an engine; to propel; to send; as, to throw stones or dust with the hand; a cannon throws a ball; a fire engine throws a stream of water to extinguish flames.

3.

To drive by violence; as, a vessel or sailors may be thrown upon a rock.

4. (Mil.)

To cause to take a strategic position; as, he threw a detachment of his army across the river.

5.

To overturn; to prostrate in wrestling; as, a man throws his antagonist.

6.

To cast, as dice; to venture at dice.

Set less than thou throwest.
Shak.

7.

To put on hastily; to spread carelessly.

O'er his fair limbs a flowery vest he threw.
Pope.

8.

To divest or strip one's self of; to put off.

There the snake throws her enameled skin.
Shak.

9. (Pottery)

To form or shape roughly on a throwing engine, or potter's wheel, as earthen vessels.

10.

To give forcible utterance to; to cast; to vent.

I have thrown
A brave defiance in King Henry's teeth.
Shak.

11.

To bring forth; to produce, as young; to bear; -- said especially of rabbits.

12.

To twist two or more filaments of, as silk, so as to form one thread; to twist together, as singles, in a direction contrary to the twist of the singles themselves; -- sometimes applied to the whole class of operations by which silk is prepared for the weaver. Tomlinson.

To throw away.
(a) To lose by neglect or folly; to spend in vain; to bestow without a compensation; as, to throw away time; to throw away money.
(b) To reject; as, to throw away a good book, or a good offer. --
To throw back.
(a) To retort; to cast back, as a reply.
(b) To reject; to refuse.
(c) To reflect, as light. --
To throw by, to lay aside; to discard; to neglect as useless; as, to throw by a garment. --
To throw down, to subvert; to overthrow; to destroy; as, to throw down a fence or wall. --
To throw in.
(a) To inject, as a fluid.
(b) To put in; to deposit with others; to contribute; as, to throw in a few dollars to help make up a fund; to throw in an occasional comment.
(c) To add without enumeration or valuation, as something extra to clinch a bargain. --
To throw off.
(a) To expel; to free one's self from; as, to throw off a disease.
(b) To reject; to discard; to abandon; as, to throw off all sense of shame; to throw off a dependent.
(c) To make a start in a hunt or race. [Eng.] --
To throw on, to cast on; to load. --
To throw one's self down, to lie down neglectively or suddenly. --
To throw one's self on or upon.
(a) To fall upon.
(b) To resign one's self to the favor, clemency, or sustain power of (another); to repose upon. --
To throw out.
(a) To cast out; to reject or discard; to expel. "The other two, whom they had thrown out, they were content should enjoy their exile." Swift. "The bill was thrown out." Swift.

(b) To utter; to give utterance to; to speak; as, to throw out insinuation or observation. "She throws out thrilling shrieks." Spenser.

(c) To distance; to leave behind. Addison.

(d) To cause to project; as, to throw out a pier or an abutment.
(e) To give forth; to emit; as, an electric lamp throws out a brilliant light.
(f) To put out; to confuse; as, a sudden question often throws out an orator. --
To throw over, to abandon the cause of; to desert; to discard; as, to throw over a friend in difficulties. --
To throw up.
(a) To resign; to give up; to demit; as, to throw up a commission. "Experienced gamesters throw up their cards when they know that the game is in the enemy's hand." Addison.

(b) To reject from the stomach; to vomit.
(c) To construct hastily; as, to throw up a breastwork of earth.

 

© Webster 1913


Throw (?), v. i.

To perform the act of throwing or casting; to cast; specifically, to cast dice.

To throw about, to cast about; to try expedients. [R.]

 

© Webster 1913


Throw, n.

1.

The act of hurling or flinging; a driving or propelling from the hand or an engine; a cast.

He heaved a stone, and, rising to the throw,
He sent it in a whirlwind at the foe.
Addison.

2.

A stroke; a blow. [Obs.]

Nor shield defend the thunder of his throws.
Spenser.

3.

The distance which a missile is, or may be, thrown; as, a stone's throw.

4.

A cast of dice; the manner in which dice fall when cast; as, a good throw.

5.

An effort; a violent sally. [Obs.]

Your youth admires
The throws and swellings of a Roman soul.
Addison.

6. (Mach.)

The extreme movement given to a sliding or vibrating reciprocating piece by a cam, crank, eccentric, or the like; travel; stroke; as, the throw of a slide valve. Also, frequently, the length of the radius of a crank, or the eccentricity of an eccentric; as, the throw of the crank of a steam engine is equal to half the stroke of the piston.

7. (Pottery)

A potter's wheel or table; a jigger. See 2d Jigger, 2 (a).

8.

A turner's lathe; a throwe. [Prov. Eng.]

9. (Mining)

The amount of vertical displacement produced by a fault; -- according to the direction it is designated as an upthrow, or a downthrow.

 

© Webster 1913


Throw, v. i. --
To throw back, to revert to an ancestral type or character. "A large proportion of the steerage passengers throw back to their Darwinian ancestry." The Century.

 

© Webster 1913

Log in or register to write something here or to contact authors.