由买买提看人间百态

topics

全部话题 - 话题: exception
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
l**1
发帖数: 1875
1
【 以下文字转载自 USANews 讨论区 】
发信人: enjoice (Miami Heat), 信区: USANews
标 题: MSN online poll:Entire planet supports Obama - except China
发信站: BBS 未名空间站 (Tue Nov 6 14:43:55 2012, 美东)
http://news.uk.msn.com/us-elections-2012/entire-planet-supports
这里的左派还在叫嚣要为中国而支持O8... 无知也无耻
p****t
发帖数: 4256
2
Except China...
其实老米用意很明显了,China支持谁,咱就得反对谁
前一阵子不还曝光中国马总统邀请某人免费游台湾,用以指责对方立场不坚定,跟
China 搞不清爽
w*********g
发帖数: 10097
3
Mar 16, 2012 9:00 AM Delivery exception BRONX, NY
Future delivery requested
Mar 16, 2012 7:41 AM On FedEx vehicle for delivery BRONX, NY
Mar 16, 2012 7:32 AM At local FedEx facility
BRONX, NY
我发布那天下午刷屏订的,就是为了早点拿到,怎么这一大早要deliver了又不让投递
了?apple你妈搞屁啊,我的也是没刻字的版本,没有任何通知说要delay啊,kao
b****z
发帖数: 4485
4
Mar 16, 2012 10:38 AM
Delivery exception
Estimated delivery
Mar 16, 2012 by 8:00 PM
R********r
发帖数: 3415
5
来自主题: CS版 - remote desktop exception
公司的机子,我想remote desktop, 但是Windows Firewall里remote desktop
exception里是灰色的,根本选不上
有没有什么办法?
a****a
发帖数: 21
6
来自主题: Database版 - database exception
anyone can help me to look at this problem? I use oracle 10g,
java.sql.SQLException: Io exception: The Network Adapter could not establish
the connection
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:319)
oracle.jdbc.driver.PhysicalConnection.(PhysicalConne
E***e
发帖数: 3430
7
来自主题: Hardware版 - AMD的APU上跑ArrayFire的exception
Exception是这里扔出来的
//frame.cpp
static void __RethrowException(EHExceptionRecord *pThisException)
{
RaiseException( pThisException->ExceptionCode,
pThisException->ExceptionFlags,
pThisException->NumberParameters,
(PULONG_PTR)&(pThisException->params) );
}
然后仔细看发现我整个屏幕都不对了
边缘有各种不明条块在闪
看来是没法用做显示的GPU跑计算的
j******n
发帖数: 1
8
来自主题: Java版 - Help! An Exception about JMS
looks like a prob bw weblogic and XP. reason could be the native JMS
implementation in weblogic doesn't work in XP (typical runtime errors in
MS-"EXCEPTION_ACCESS_VIOLATION"). based on your simple code snippets, you may
have nothing to do but ask weblogic, see similiar prob occurs before or they
have a patch.

exception:
at
at
weblogic.jms.dispatcher.DispatcherImpl.dispatchAsync(DispatcherImpl.java:149)
weblogic.jms.dispatcher.DispatcherImpl.dispatchOneWay(DispatcherImpl.java:429)
at
weblogic.rm
p***p
发帖数: 559
9
来自主题: Java版 - 关于Exception,Catch
以前都是晕着来的,没什么特别注意,反正是用别人的API,提醒我要CATCH就好了。最近
开始写自己的API,一下子晕菜了,现在总结一下
1 如果一个工作中间不能出任何问题,就可以从头到尾全部筐起来,出错就直接到最后
catch。比如打开数据库连接,准备数据,写入数据,前后一个都不能出问题。
2 如果中间某个步骤出问题,但是程序还可以继续前进,就单独筐那个步骤。比如监视写
入的数据,显示时候出问题,但是不影响整体存储工作。
3 如果出问题一定要强制API使用者知道,比如存个数据到数据库失败了,就在method定
义里面写出throws某个错误。方法内部可以不catch或者catch之后重新生产个exception

4 如果出了问题想就地隐瞒,就干脆catch了算了,比如关闭数据库连接等等不重要的错
误。
各位批改一下
m******t
发帖数: 2416
10
来自主题: Java版 - 关于Exception,Catch
My 2 cents below.


That's right, in general. I would be careful though not to blindly catch
Exception. I would make sure whatever caught in each catch block is meant to
be handled that way. Also don't forget to add the finally block in case you
have any resource releasing to do.

Sure.

216.58.13.166
128.143.181.42
66.254.232.134
35.9.66.33
10.145.226.221
13.139.221.191
131.94.119.109
65.241.182.51
12.4.195.228
65.87.188.198
209.158.27.72
129.252.11.168
128.235.248.219
71.195.204.103
128.97
p***p
发帖数: 559
11
来自主题: Java版 - 关于Exception,Catch
设计这个真是比较头疼的事情,工作量和设计API本身差不多,回头使用者又稀里糊涂全
Catch了
打算完成之后,把所有的throws全部拿掉看看还有哪些exception,一个一个的重新理清
楚逻辑关系
而且自己归类例外的种类也挺烦,哪些算参数例外,哪些算状态例外
c*****t
发帖数: 1879
12
来自主题: Java版 - 关于Exception,Catch
你没看懂 code 。



exception
xt
发帖数: 17532
13
来自主题: Java版 - 关于Exception,Catch
在某些情况下还是可以的,比如在finally-block里面关闭java.sql.Connection或者
ResultSet.通常情况下最好不要蔫不溜地把错误藏起来,不瞒你说我非常痛恨这种style.
我痛恨的另外一种style是随随便便地往外扔java.lang.Exception,除非是个很随便的
小程序可以原谅.
p***p
发帖数: 559
14
来自主题: Java版 - 关于Exception,Catch
设计这个真是比较头疼的事情,工作量和设计API本身差不多,回头使用者又稀里糊涂全
Catch了
打算完成之后,把所有的throws全部拿掉看看还有哪些exception,一个一个的重新理清
楚逻辑关系
而且自己归类例外的种类也挺烦,哪些算参数例外,哪些算状态例外
c*****t
发帖数: 1879
15
来自主题: Java版 - 关于Exception,Catch
你没看懂 code 。



exception
c*****t
发帖数: 1879
16
来自主题: Java版 - 关于Exception,Catch
Forgot to add, Step1Exception and ConversionException are child classes
of MyLibException. I didn't mention it because in the earlier post I
mentioned that all exceptions generated in the library code must be
child classes of MyLibException.
g****y
发帖数: 15
17
来自主题: Java版 - 关于Exception,Catch
www.javaworld.com上有几篇关于exception的文章,写得不错,可以参考一下。
c*****t
发帖数: 1879
18
来自主题: Java版 - 关于Exception,Catch
你没看懂 code 。



exception
r****c
发帖数: 2585
19
I just have a piece of code as follows
public void methodA()
{
methodB(paramA, new Class() throws AException {
Noname class
}

}
According to common jave exception practice, should I also modify methodA to
throws AException?
g*****g
发帖数: 34805
20
Usually you don't extend RuntimException unless you want to
halt the system when the exception is throwed.
g*s
发帖数: 2277
21
initCause(Throwable cause)

exception
l*****b
发帖数: 82
22
来自主题: Java版 - JBoss UDP exception
When I start Jboss 4.0.4, it keep throwing UDP exceptions. However, it never
happened before. Do you know what is root cause? There is also some issue
about the naming server port: 1099. When I use program to check the port
1099, it always return true even the JBoss is not up yet. I am not sure they
are relative.
2008-12-10 10:27:57,311 WARN [org.jgroups.protocols.UDP] packet from /193.32
.21.76:32793 has different version (") from ours (0227). This may cause
problems
2008-12-10 10:27:57,311
c******n
发帖数: 4965
23
like
@Path("/helloworld")
public class HelloWorld {
//////////// below is the problem
public HelloWorld() throws Exception {
}
@Get
public String sayHello() {
return "hello";
}
}
a*****p
发帖数: 1285
24
来自主题: Java版 - 问个exception的问题
问个exception的问题
我有个java.lang.NullPointerException,然后throwalbe变量是e,我想在textarea里
面打出e的所有信息。我用e.getName()能把名字显示出来,为啥e.getMessage()显示是
null?
后面具体的信息,at line**,这些怎么显示出来么?不是getMessage()又是什么呢?
网上也查了,试过e.getCause().getMessage()也不行。这个是哪里有问题了?
java.lang.NullPointerException
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:1... 阅读全帖
g*****g
发帖数: 34805
25
来自主题: Java版 - 问个exception的问题
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
String exceptionAsStrting = sw.toString();
or org.apache.commons.lang.exception.ExceptionUtils.getStackTrace(Throwable)

196)
y***d
发帖数: 2330
26
The jdbc/hibernate templates seem to be fine.
I went across some buggy spring components that failed to declare the
exceptions in the function signature, and gave me some surprises.
Now I think it is more of an immature implemtation problem.
t*******e
发帖数: 684
27
Very useful information. There are merely 2 exceptions developers should
catch in programming Spring-based persistence,
OptimisticLockingFailureException & PessimisticLockingFailureException(
DeadlockLoserDataAccessException).

problems,
b***i
发帖数: 3043
28
finally got it.
Put the exception on google, found a german forum. Used google translate to
English, found the explanation is that I modified the UI outside EDT. So
use invokeAndWait to solve the problem.

,
b***i
发帖数: 3043
29
来自主题: Java版 - Concurrent Exception in Swing
我在main里面调用一个自己写的类OldSplashScreen的函数,起了一个线程,执行
splash()(其中145行splashWindow = new SplashWindow(this,fImage);)
178在一个private class SplashWindow extends JFrame的类中,是构造函数
private class SplashWindow extends JFrame {
BufferedImage base=null;
public Graphics2D gS=null;
private static final long serialVersionUID = 1L;
BufferedImage bf=null;
BufferedImage canvas=null;
178: SplashWindow(Frame aParent, Image aImage) {
构造函数怎么会出错?我估计是非Swing EDT里面调用Swing类Frame子类的构造函数了。
... 阅读全帖
b***i
发帖数: 3043
30
下面main代码如果comment,则程序正常。否则每10次有大概一次出问题。咋回事?
theFrame=new JFrame();
theFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
theFrame.setLayout(new BorderLayout()); // original border layout
textpane = new JTextArea(20,40);
textpane.setSize(300,300);
textpane.setText("Please wait for the main to load");
JScrollPane js=new JScrollPane(textpane);
theFrame.add(js, BorderLayout.PAGE_START);
theFrame.pack();
theFrame.setVisible(true);
其他地方,只有这里需要theFr... 阅读全帖
b***i
发帖数: 3043
31
我加入了connection pool在standalone.xml里面, driver后面。
mysql

10
20
true

Push之后好用,但是重启后仍然Exception。过一段时间就好了,比如几个小时。
不知道下面这个加在哪里?网上说可以检查连接什么的。有用吗?
select 1
z*********e
发帖数: 10149
32
在另外一个debian的机器上也试了下,jdk 1.7.0_75,直接javac,也是说有unhandled
exception
y*h
发帖数: 25423
33
最近老是死机,出现类似下面这类kernel panic错误:
CPU 2: Machine Check Exception: 4 Bank 0: f603200000000833
TSC 1b99bb7175d ADDR 391fd080
Kernel panic - not syncing: Machine check.
一般是什么问题?
j**********p
发帖数: 22
34
来自主题: Linux版 - exception与interrupt的区别?
Probably it should have said this, exceptions are typically generated by
instructions, while interrupts are irrelevant to instructions, which could
be after or in between instructions.
yy
发帖数: 45
35
来自主题: Programming版 - c++:exception 一问
例子如下:
Class A;
try {
A obj_A;
throw obj_A;
}
catch(A)
catch(A&)
如果我理解没错的话, throw obj_A 会 call 一个copy constructor
产生一个temporary exception obj_tmpA=A(obj_A);
我想知道的是这个 obj_tmpA的lifescope 是怎么定义的,
是包含 try and catch 的那个 {} 吗?
谢谢
c********e
发帖数: 383
36
来自主题: Programming版 - c++:exception 一问
one simple rule for c++ exception, always catch by reference. avoid all
these hard to believe spots.
n********e
发帖数: 272
37
来自主题: Programming版 - a g++ new exceptions question
I used catch(std::bad_alloc) in my code to catch exceptions if 'new' fails.
But when i execute my code, a segamentation error happened. But GDB revealed
it was an early memory problem caused the error.
I used valgrind and efence, both tell me that an early 'new' operation failed.
But why it wasn't caught by my catch? by the way, I have enough memory for the
whole process.why I can still get a bad memory allocation error?
thanks
c********e
发帖数: 383
38
来自主题: Programming版 - c++ exception 一问
throw without an operand means re-throw. if re-throw is used in a context
when
there is no exception, terminate () will be called.
P*****f
发帖数: 2272
39
来自主题: Programming版 - 请问一个exception题目
http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.3

#include
#include
using namespace std;
class A{
public:
A(){}
~A(){throw "aa";}
};
int main(int argc, char** argv){
try{
A a;
try{
A b;
A c;
}catch(...){
cout<<"kkk1"< }
}catch(...){
cout<<"kkk2"< }
cout<<"kkk3"< return 0;
}
program crash. 请问怎么就crash了?
如果去掉"A c;",一切正常. 谢谢!
b******n
发帖数: 592
40
来自主题: Programming版 - how to test exception handling code?
Is there any automated way to test exceptions?
c******n
发帖数: 145
41
来自主题: Programming版 - c++ exception
If you mean throw...catch, I think all function should throw an exception
when they cannot fulfill the promises.
I guess what you want to say is the "class invariant"??? It is often called
at the end of the CTOR.
g*****g
发帖数: 34805
42
来自主题: Programming版 - one question about exception
The catch should go from specific to general, i.e.
chidrens to parents in that order so that chidrens have
a chance to catch it and give a more specific message.
If two exceptions are unrelated, then it doesn't matter.
e***a
发帖数: 18
43
来自主题: Programming版 - C++: exception: out-of-order execution?
There are situations that exception could be throw within constructor and we
usually employ auto_ptr to protect resources. But if we do not have auto_
ptr can we use the following technique to handle it?
Please search "QUESTION" and see my question.
Thanks!
#include
using namespace std;
class E1 {
public: E1() {
int i = 1;
int j = 2;
int k = 3;
printf("i = %d, j = %d,
t******c
发帖数: 348
44
来自主题: Programming版 - C++: exception: out-of-order execution?
since you throw an exception in the constructor of E1,
i don't think an E1 object is successfully constructed,
that means E1 object still doesn't exist.
there is no reason to call ~E1() to destory something not born yet.
so there is no *beep* resources for you to protect and release!

we
f******e
发帖数: 164
45
有人听说过Herb Sutter的《Exceptional C++ Style》么?这本书怎样,有看过的评价
一下么?谢谢。。
t****t
发帖数: 6806
46
来自主题: Programming版 - 关于 exception 的一个问题
what if string throw another exception?
r*********r
发帖数: 3195
47
来自主题: Programming版 - 关于 exception 的一个问题
但是 logic_error 和 runtime_error 都有 data member 是 string 类型.
也就是说你 throw 一个 runtime_error object 时, 要作 string 的 copy
construction,
这样也有可能 throw another exception
r*********r
发帖数: 3195
48
来自主题: Programming版 - 关于 exception 的一个问题
well, the standard says logic_error's interface is like this:
class logic_error : public exception
{
public:
explicit logic_error(const string& __arg);
}
hard to imagine an implementation that can actually avoid copying __arg.
can you?
r*********r
发帖数: 3195
49
来自主题: Programming版 - 关于 exception 的一个问题
i came up with an idea: define a char * data member x;
and do the following in the constructor:
x = (char *)malloc(__arg.size());
strcpy(x, __arg.c_str());
and return x in what(), and call free(x) in the destructor.
maybe that works, at least it's guaranteed that no additional exception will
be thrown.
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)