釋義
throw
vi.投擲;丟;拋
n.投擲的距離;丟
vt.擲(色子/骰子);拋;猛動(頭、臂、腿);使處於,使限於
易混淆的單詞:throw
1. 投,擲,拋,扔[O1][(+at/to)]
She threw me a towel.
她丟給我一條毛巾。
The boy threw a stone at the dog.
那男孩對狗丟石頭。
He quickly threw the ball to another player.
他迅速把球傳給了另一名球員。
2. 使突然陷入;把
...投進[Q][(+into)]
The news threw the family into a panic.
3. 匆匆穿上(或脫下)[Q]
She threw a scarf over her shoulders.
她把披巾隨手往肩上一披。
4. 轉動(機器開關)
5. 發射;投射;噴射
The trees threw long shadows in the moonlight.
在月光下,樹木投出了長長的影子。
6. 伸(四肢);挺(胸);仰(首);揮(拳)猛擊
7. 擲(骰子);擲出(骰子點數)
8. 摔倒;摔下
He threw the guy to the ground.
他把那個傢伙摔倒在地。
He threw a party for us.
他為我們舉行舞會。
10. 【口】使困惑;難住
Her last question threw me for a moment.
她最後一個問題我一時回答不出。
12. 【口】故意輸掉(比賽等)
13. 大發(脾氣),使發作
I can't fiqure out why she threw such tantrums.
我弄不懂她為什麼發如此大脾氣。
14. 施加(影響等)
1. 投,擲,拋,扔
The young athlete throws well.
那個年輕運動員投擲得很好。
名詞 n. [C]
1. 投擲
2. 投距,射程
My nephew lives only a stone's throw from my house.
我侄子住得離我家很近。
3. 投擲的結果;(骰子)擲出的點數
4. 圍巾,披巾;(沙發等的)罩單
5. 【口】冒險
That will be her last throw.
解釋
名詞
throw:
1. the act of throwing (propelling something through the air with a rapid movement of the arm and wrist)
2. a single chance or instance
3. the maximum movement available to a pivoted or reciprocating piece by a cam
4. bedclothes consisting of a lightweight cloth covering (an afghan or bedspread) that is casually thrown over something
5. casting an object in order to determine an outcome randomly
動詞
throw:
1. project through the air
2. move violently, energetically, or carelessly
3. get rid of
同義詞:shed, cast, cast off, shake off, throw off, throw away, drop
4. place or put with great energy
同義詞:thrust
5. convey or communicate; of a smile, a look, a physical gesture
6. cause to go on or to be engaged or set in operation
同義詞:flip, switch
7. put or send forth
同義詞:project, cast, contrive
8. to put into a state or activity hastily, suddenly, or carelessly
9. cause to be confused emotionally
同義詞:bewilder, bemuse, discombobulate
10. utter with force; utter vehemently
同義詞:hurl
11. organize or be responsible for
同義詞:hold, have, make, give
12. make on a potter's wheel
13. cause to fall off
14. throw (a die) out onto a flat surface
15. be confusing or perplexing to; cause to be unable to think clearly
同義詞:confuse, fox, befuddle, fuddle, bedevil, confound, discombobulate
習語
a stone's throw 投石可及的距離, 附近; 一箭之地
a stone's cast 投石可及的距離, 附近; 一箭之地
free throw 【體】(籃球)罰球
throw about (=throwaround)亂丟, 亂扔 (around)[俗]亂花錢 揮動(
手臂等) 【航海】轉變航向
throw away 扔掉, 拋棄 浪費(金錢、時間等) 錯過(機會等) 有意輕輕帶過(台詞等) (牌戲中)墊(牌)
throw back 丟回; 擲回; 回溯 拒絕, 反駁, 反譏 妨礙; 耽誤; 阻止; 擊退 回復到祖先的原型或性質, 呈
返祖現象(指動植物) 反射(光線等)
throw by 把
...扔在一邊; 扔掉, 拋棄
throw down 扔下; 推倒; 傾復; 摧毀 (=throw oneself down)突然臥倒; 躺下 [俚]拒絕
throw in 額外奉送, 外加 偶然插入(話語), 穿插 [口]入伙, 參加合夥經營 (在足球等比賽中)擲(
界外球) 把(排好的鉛字等)拆開歸還
原處throw off 脫去; 擺脫; 拋棄, 扔掉 [口]即席作成(詩、畫等) 使困窘; 使慌亂 散發出, 放射出 說
...壞話, 誹謗(on) 開始出獵
throw oneself at 猛然撲向 拚命討好...; 勾引..., 向...獻媚, 向...表示有意
throw oneself into 開始熱心做(某事), 積極投身於(某事業)
throw oneself on 依靠, 依賴; 聽命於 攻擊, 突襲
throw oneself upon 依靠, 依賴; 聽命於 攻擊, 突襲
throw out 拋出, 扔掉 解僱; 開除 增建(側房); 建造(伸展或突出的建築物) 提出(意見, 暗示); 輕描淡寫地說出 否決(議案); 拒絕(提議等) 使分心, 打擾; 使不知所措 散發出 (棒球運動用語)封殺出局
throw over 放棄, 拋棄; 背棄
throw overboard 丟在船外, 扔到水中 拋棄, 遺棄; 背棄
throw together 匆匆拼湊成; 匆匆建成 使偶然相遇; 使偶然聚合在一起
throw up 嘔吐 辭(職); 放棄;
洗手不乾(責備地)反覆地說; 反覆提起(不愉快之事) 產生; 出(人才) 把
...襯托出來, 使...顯眼 匆匆建成
過去式和過去分詞
過去式threw
過去分詞thrown
程式語言
聲明
throw 聲明的作用是創建
exception(
異常)。你可以把這個聲明與 try...catch 聲明配合使用,以達到控制程式流並產生精確錯誤訊息的目的。
語法
throw(exception)exception
註:不同的計算機語言會有各自的語法,但基本用法一樣。
實例
javascript語言
下面的實例的作用是測定變數 x 的值。如果 x 的值大於 10 或者小於 0,錯誤就會被拋出 (throw)。這個錯誤被 catch 的參數捕獲後,就會顯示出自定義的出錯信息。
<html> <body> <script type="text/javascript"> var x = prompt("Enter a number between 0 and 10:", "") try { if (x > 10) throw "Err1" else if (x < 0) throw "Err2" } catch(er) { if (er == "Err1") alert("Error! The value is too high") if (er == "Err2") alert("Error! The value is too low") } </script> </body></html>
2.C#語言
class A{ private void aa() { B bb =new B(); try { //這裡調用了B的bb方法,並且捕獲了bb拋出的異常同時進行了處理 } catch(Exception e) { messagebox.show("Class B Error:"+e);//這裡處理了bb的異常信息 } }}class B{ int i = 0; public void bb() { if(this.i != 0) //這裡做了個假設,看著意思明白就可以了 { throw new Exception("電腦故障了,i不可能大於0."); } }}
這裡就不要用throw了,直接用一個messagebox.show(("列印發生錯誤"+err.Message);就可以了。