由买买提看人间百态

topics

全部话题 - 话题: except
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
d*******r
发帖数: 3299
1
来自主题: Programming版 - Exception
问个问题,为什么语言不设计成让每一个 function 都能有一个返回值: unexpected_
return_value, 然后所有函数的 caller 都必须强制 check和处理这个值呢? 这样算是
算用 return value 实现了 exception?
我的意思是说,编程语言本身,在未知错误下,能确保 function 返回这个
unexpected_return_value.
当然,很久前学 C++ exception 时候,记得说 exception 还有个所谓好处: 把处理错
误的代码和正常逻辑的代码分开.
d*******r
发帖数: 3299
2
来自主题: Programming版 - Exception
问个问题,为什么语言不设计成让每一个 function 都能有一个返回值: unexpected_
return_value, 然后所有函数的 caller 都必须强制 check和处理这个值呢? 这样算是
算用 return value 实现了 exception?
我的意思是说,编程语言本身,在未知错误下,能确保 function 返回这个
unexpected_return_value.
当然,很久前学 C++ exception 时候,记得说 exception 还有个所谓好处: 把处理错
误的代码和正常逻辑的代码分开.
m*****e
发帖数: 35
3
class Exception1(exception):
def __init__(self):
...
if xxx:
raise RuntimeError('mmmmmm')
what happens with the above code when the program raise an Exception1 ?
I don't quite understand how the two exceptions (i.e. Exception1 and
RuntimeError) are handled at runtime.
Thanks
j*****n
发帖数: 55
4
来自主题: Olympics版 - exceptional被翻译成了无以伦比
GOOD ,VERY GOOD, EXCEPTIONALLY GOOD,特别好,特别出色的意思。。罗格估计是想说
最好,但是为了照顾其他届的面子,也避免给英国太大压力。所以说了EXCEPTIONAL.
S********k
发帖数: 66
5
"unforgetable" ---- 2004 Athens Summer Game
"truly magnificent" ---- 2006 Toroino Winter Game
"superb" ---- 2002 Salt Lake City Winter Game
"truly exceptional" ---- 2008 Beijing Summer Game
以上全都是罗格对历届奥运会的评价,我的排名如下:
truly exceptional > truly magnificent > superb > unforgetable
in another word:
Beijing > Torino > Salt Lake City > Athens
欢迎补充
R***m
发帖数: 6
6
来自主题: Olympics版 - 关于truely exceptionly, 谁还有印象?
反了
http://74.125.95.104/search?q=cache:Ke3nQrgrj60J:www.must.edu.my/pdf/evaluation.pdf+outstanding+truly+exceptional+excellent+above+average+below+average&hl=zh-CN&ct=clnk&cd=2&gl=us&client=firefox-a
随便google一下就知道了
How does this applicant compare with his or her peer group in academic
ability?
Tick where applicable.
Truly exceptional
Outstanding
Well above average
Average
Below Average
Inadequate opportunity to observe
Not applicable
c********n
发帖数: 4762
7
来自主题: Olympics版 - 比exceptional强的词有哪些?
more exceptional -> most exceptional
g*******e
发帖数: 13
8
来自主题: Olympics版 - Truly exceptional Games?
你不能这么用字典的,这可真成了掉书袋了.
首先字典不是法律,给出的解释是suggestion,不是definition.具体的意思必须根据常
用法和语境得出。
另外以下三个解释中,最接近罗格的意思是(2),但是(2)翻译成中文后多了个常规的规
字,然后你根据这个规字得出结论就是exceptional是指规模上的大小,这就失之毫厘
谬之千里了。
Exceptional means something that is so good that people don't or cannot
expect it. It contains a suggestion that this is not something subjectively
good, it is objectively good regardless the stance of the observer. That is,
it can be as good as beating statistics odds. It contains another
suggestion that this is something so
h***y
发帖数: 4936
9
来自主题: Olympics版 - Truly exceptional到底啥意思啊
就是说亚特兰大那个exceptional是假的,北京才是真的exceptional
lol
y*****w
发帖数: 1350
10
来自主题: Olympics版 - Truly exceptional到底啥意思啊
中文翻译给夸大了。无与伦比是Nothing Compares to You吧。我觉得英文里
exceptional是程度最高的夸奖词了,从低到高的顺序是good < excellent <
outstanding = superb = gorgeous < exceptional。
u*********1
发帖数: 2518
11
来自主题: Olympics版 - Truly exceptional到底啥意思啊
exceptional一定是指的“好”的意思么
可以是坏的exceptional啊
L*********2
发帖数: 10195
12
呵呵,现在发现,楼上各位都很exceptional,居然跑到一个如此不exceptional甚至无
赖的地方来糟蹋自己。。。。
d****i
发帖数: 4354
13
exceptional 不是自动等同于最强大,最富有.最初的意义只是与众不同而已.
讲American Exceptionalism的人也不能直接等同于大国沙文主义,更多作用的是一种自
励自强的作用.
其实瑞士也是个exceptional的国家,可惜不够大,人口不够多.
我觉得你对American Exceptionalism理解有些偏差.
w****m
发帖数: 146
14
Sorry for thr confusion, I should clarify it: If during stack unwinding a
dtor throws an exception and it is not caught and handled, the terminate()
function will be called. So be prepared to catch any potential exception in
dtor
l*********8
发帖数: 4642
15
来自主题: JobHunting版 - leetcode OJ 不能使用exception?
谢谢提醒。 编译器应该有turn on/off exception的参数的。想必leetcode把
exception handling turn off 了。
w**t
发帖数: 592
16
来自主题: JobHunting版 - 请教 C++ exception 面试问题
前段时间的面试题,大概是这样的。在某指针指的内存得到释放之前,发生了
exception. 请问关于这个指针/内存这个会发生什么事情?
try
{

//throw an exception;
//释放某指针
}
catch ()
{
}
c********o
发帖数: 20
17
我们想买个forecloseure的condo, 想要卖方银行提供title insurance WITHOUT the
standard exceptions, 但是他们不同意,只愿意提供title insurance WITH the
standard exceptions. 如果我们接受他们的这个以后会有什么问题吗? 谢谢
C*******t
发帖数: 169
18
来自主题: Living版 - Homestead Exception的问题
不知道发到那个版面, 如果错了, 请帮转一下, 多谢!
我的问题是过于property tax 的Homestead Exception。 我和老公于 2002 年底 由
WI搬到IL。当时买房是贷款的。所以property tax 都是由escrow公司帮着付的。直
到2008年, 我们才意识到, 我们每年的property tax 并没有享受home owner
’s Homestead Exception.也就是我们每年多付出了$600 的property tax 长达6
年。 这之前一直是我老公在负责所用账单。 我倒今天才发现。 我知道township一
直强调不能翻旧账。有没有途径可以讨回一部分多付的钱?
C*******t
发帖数: 169
19
来自主题: Living版 - Homestead Exception的问题
还有一些细节。不巧的是,2003 年, 我们的county给每家每户寄出卡片,重新评估
Homestead exception. 我们似乎并没有接到。 2008年由于其他什么事情, 我老公打
电话给COUNTY, 他们才问我们是不是住在这所房子里。告诉他我们可以有Homestead
exception。 他们说不知为什么有很多住户没有收卡片到或被退回。 刚刚和邻居聊起
此事。她说知道2006年他们也才意识到并更正。我老公是个非常非常仔细的人,巨然疏
漏了这一点。就算给当地财政捐款了。不过没有人感恩罢了。谢谢你的指点。
j**t
发帖数: 61
20
最近收到Title Company送来的Commitment for Title Insurance, 发现Schedule C中
的Exceptions包括了卖家的一个Vendor's Lien retained in Deed 和两个 Deed of
Trust。我的理解是我的Title Insurance Policy将不Cover 这些 Deeds。如果将来万
一这些Deeds出问题,有可能影响我的房屋所有权吗?如何才能将这些条款去掉?是找
我的realtor, Loan officer还是律师帮忙?Item#6中的日期(dated December 30,
1899)是什么意思,是typo error吗?
另外,Schedule C 中还说:Recorded Deeds for the last 24 months are: None. 然
而,在 贷款银行 给 我们的 Property Valuation Documents 说到:This property
has transferred ownership more than once within two years ... 阅读全帖
b*******e
发帖数: 302
21
孩子去年超过半年不在美国,(在中国读书),但1040 instruction中有如下
Exception:
Exception to time lived with you. Temporary absences by you or the other
person for special circumstances, such as school, vacation,
不知道在中国读书算不算上述提到的school。
正在申请绿卡,不想出错,如能给点提示,不胜感激!
A*********r
发帖数: 8271
22
来自主题: Immigration版 - NIW需要证明Exceptional Ability么?
国家利益豁免部分是无论如何都要说的。Exceptional Ability本身没有学位要求的。
就跟EB1a似的,没有说你一定要有博士学位啊。如果爱迪生申请的话,只要也证明三点
就够了。
本科工作五年,就很tricky。因为如果可以argue本科加工作五年,相当于advance
degree,那就不需要证明exceptional ability了。

发帖数: 1
23
刚发现这个网页:
https://www.uscis.gov/working-united-states/permanent-workers/employment-
based-immigration-second-preference-eb-2
里面规定 for NIW:You must meet at least three of the criteria below* and
demonstrate that it is in the national interest that you work permanently in
the United States. 这和我发的第一个帖子中的要求类似。是说我还是需要提供
Evidence of professional membership? (我只符合1 & 6,其他条件不符合)
1) Official academic record showing that you have a degree, diploma,
certificate, or similar award from a college, universit... 阅读全帖
L******k
发帖数: 33825
24
【 以下文字转载自 Education 讨论区 】
发信人: LXJSmonk (紫色心情的 LXJS NYC_monk), 信区: Education
标 题: Foreign Languages Fade in Class — Except Chi
发信站: BBS 未名空间站 (Thu Jan 21 10:44:50 2010, 美东)
Foreign Languages Fade in Class — Except Chinese
http://www.nytimes.com/2010/01/21/education/21chinese.html
WASHINGTON — Thousands of public schools stopped teaching foreign languages
in the last decade, according to a government-financed survey — dismal new
s for a nation that needs more linguists to conduct its global busi
j***1
发帖数: 450
25
【 以下文字转载自 Military 讨论区 】
发信人: ja941 (aka ja94), 信区: Military
标 题: chinese women should fuck every race except asian
发信站: BBS 未名空间站 (Mon Jan 28 16:07:32 2013, 美东)
white, black, mexicans...
except stupid asian men
who the fuck want their son to look like a WSN, grow up to be only 5 feet 7
or 5 feet 6, short as fuck, wearing thick fucking glasses, greasy hair,
small hands, small feet, and u know, most importantly, a small fucking dick!
china should welcome americans with different skin colors to c... 阅读全帖
G***G
发帖数: 16778
26
来自主题: EnglishChat版 - except that
although the meaning is the same, I am still curious about the difference.
I guess there should be some kinda differences.
why?
because 'except that' is followed by a past tense verb and
if not by a past perfect tense verb.
except that is not virtue tense, but 'if ..had not' is a virtue tense.
what does it exactly mean when a 'would have been' is followed by
a clause with a past tense verb?
r*****l
发帖数: 2859
27
来自主题: Database版 - About exception
When an exception happens, how can I retrieve the information of the
exception?
In PL/SQL.
Thanks a lot.
a********y
发帖数: 20
28
Do you plan what exceptions and how many exceptions
before you start coding?
Thx.
L*******r
发帖数: 1011
29
depends on how many function models you have.
I like to classify exceptions from their models.
And I always give a way that when end-user administrator
reports us the error message, we can find the exact palce
of that code.
I also wrote exceptions manual in my formal company. :)
p***n
发帖数: 635
30
1) MSDN 上有个关于EXCEPTION MANAGEMENT的APPLICATION BLOCK
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/emab-rm.asp
2) Also, an old but good guide on EXP MGMT
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/exceptdotnet.asp
3) A list of references :
http://www.dotnet247.com/247reference/guide/39.aspx
4) 这本书的第二章,有一段对于EXCEPTION,TRACING,LOGGING比较精辟的论述:
碰巧,AW上的SAMPLE CHAPTER就是这一章.
http://www.awprofessional.com/isapi/product_id~%7B7213929D-3C04-4D0D
t**i
发帖数: 688
31
来自主题: Hardware版 - forrtl: severe (157): Program Exception
一个windows下用的程序,双击exe可以运行给出结果,但在命令行下运行的话一两秒后
会有memory exception,大概是什么问题?
forrtl: severe (157): Program Exception - access violation
b*h
发帖数: 353
32
来自主题: Java版 - Help! An Exception about JMS
Hello everyone, Sorry it is not convenient for me to input Chinese from this
computer.
When my project is running on XP, this exception comes up frequently. What
should the reason be? And how should I fix it? The following is the exception:
xt
发帖数: 17532
33
来自主题: Java版 - 关于Exception,Catch

我不同意你的看法。如果一个方法要catch多种exception,并把它转化成MyLibException

那么应该对MyLibException单打catch否则你会有多层MyLibException套在一起,这也是
exception handling里面手脚不干净的表现。
g****y
发帖数: 15
34
来自主题: Java版 - 关于Exception,Catch
水平不行,是看不懂您的程序呀。您这样写法符合OOP设计原则嘛?
我想也许你的这种处理exception的方法对于你的程序是可用的,但这并不是通用
的exception处理的方法,至少我看过的source code还没看到有人这样写过。
c*****t
发帖数: 1879
35
来自主题: Java版 - 关于Exception,Catch
like this:
public void doItAll (...) throws MyLibException
{
try
{
// check arguements
if (...)
throw new IllegalArgumentException ();
// do step 1
try
{
...
doSomeThing ();
}
catch (Exception ex)
{
m_exceptionHandler.handleException (new Step1Exception (ex));
}
// do step 2
...
}
catch (MyLibException ex)
{
throw ex;
}
catch (Exception ex)
{
throw new MyLibException (ex);
}
}
public vo
xt
发帖数: 17532
36
来自主题: Java版 - 关于Exception,Catch


光知道catch不行,还要知道擦屁股的重要性。比如说这样写就不对:
try{
Connection conn = dataSource.getConnection();
PreparedStatement stmt = conn.prepareStatement("Select * from myTable");
ResultSet rset = stmt.executeQuery();
...
}catch( SQLException e ) {
...
}
原因是在出了exception后你没有办法擦屁股。所以要把conn, stmt, rset全部在try{}外

declare,然后在catch后面写
fianally{
if( rset!=null){
try{
rset.close();
}catch (Exception e ){
//ignore
}
}
...
}
把rset, stmt和conn全部关闭。用finally还有个大忌就是在finally里面绝对
不可以返回, 更不可以返回值。
m******t
发帖数: 2416
37

Technically, an uncaught exception does not halt the entire jvm (if that's
what you meant by "system"). If I'm not mistaken, it ends up killing the
thread throwing the exception - of course, if that thread happens to be the
main GUI thread in a Swing app, it would indeed appear to have halted the
entire system. 8-)
p***p
发帖数: 559
38
Sometime I need to catch a exception and create a new one,
} catch (oldException e) {
throw new newExcetion(e.getMessage());
}
e.getMessage() the right way to hand off exception information? Seem some
infor get lost after some jumps.
y***d
发帖数: 2330
39
把各种情况都转换成了 unchecked exception, 搞的常常不知道什么地方会蹦出来什么
样的臭虫; 我觉得最少在函数里面得声明一下有什么样的 unchecked exception 才好,
但是很多地方连这个也没有;
y***d
发帖数: 2330
40
I want to handle the situations when a sql/jms/other server is rebooting,
and also want to handle the 'interrupted' exception, for which case I want
the thread to make a decent exit.
with these unchecked exceptions, it seems to be rather hard to do this.
b***i
发帖数: 3043
41
来自主题: Java版 - Concurrent Exception in Swing
遇到一个Exception,忘了截屏了,大概是Nimbus Look and Feel试图什么东西,发生
了concurrent的exception。代码是
public static Debug= new JCheckBox("Debug");
就是说,没有使用invokeLater,可能Swing多线程的情况下,修改了一个容器类的变量
,导致冲突。我估计得改成invokeLater,invokeAndWait吧?
d****i
发帖数: 4809
42
org.hibernate.exception.JDBCConnectionException
你怎么连的数据库?这个exception应该就是提示连接有问题。

database
z***l
发帖数: 256
43
来自主题: Linux版 - exception与interrupt的区别?
读《Linux Kernel Primer》,上面写exceptions typicall happen after an
intruction's exectuion, and interrupt can happen in between instructions。
这里我不太清楚after an intruction's exectuion 和between instructions的差别。
难道是指的exceptions 是一个在取指令周期,取数据周期和执行周期都完成之后发生
,而interrupt 可以在这些周期之间发生?
请教高手,谢谢!
i*****r
发帖数: 265
44
来自主题: Linux版 - exception与interrupt的区别?
Interrupts are called asynchronous exception, which are generated by
hardware devices. Exception is generated by CPU (instructions) after the
termination of instruction (typically).
u****u
发帖数: 229
45
来自主题: Programming版 - 为什么用try catch不住exception?
比方这么一段程序:
int a=1, b=0,c;
int *p;
try {
c = a / b ;
p = new int [300000000]; //3Gmemory
}
catch (...)
{
cout << "error";
}
应该出现两个exception,一个是divided by zero,一个是failed to allocate memory,
本意是应该让catch 来输出出错,并不中断程序执行。
但是编出来的程序不能catch任何一个exception,程序还是会被中断。这到底是什么原因
呢?哪位高手指教一下吧。
环境:windows, bcc5, console application.
G****n
发帖数: 618
46
来自主题: Programming版 - Why does default exception use char *?
Why does default exception use const char* instead of std::string
when defining the what() member function?
const char* const what() const;
I think the reason is to avoid dynamic memory allocation so no
additional exceptions are thrown, which might be caused by
the std::string class.
e***a
发帖数: 18
47
来自主题: Programming版 - C++: exception: out-of-order execution?
thanks for coming to help.
little bit confused about this out-of-order execution stuff.
first:
int a = 1; // 1
int b = 2; // 2
...
it is possible that b = 2 executed before a = 1;
second:
class A;
class B;
...
A a;
B b;
is it possible that B b executed before A a?
last:
class A {
____public: A() { throw 1; }
...
};
A a; // exception is thrown within constructor of A
B b;
is it possible that B b executed and b constructed before the exception is
thrown?
z*y
发帖数: 1311
48
来自主题: Programming版 - C++ exception handling 一问
I use visual studio 2005.
"try" 和 "catch (...)" 能catch住所有的exception吗?怎么我用了以后程序还是报
错有unhandled exception呢(从debug看try/catch放的位置应该是对的)?
thanks for the help.
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)