格式为: try { int i = int.Parse(Console.ReadLine());//容易发生错误的语句 Console.WriteLine("你输入的没有错误"); } catch (Exception e) { Console.WriteLine("你输入的格式有误!!!"...
分类:
其他好文 时间:
2014-10-18 18:08:56
阅读次数:
152
获取当前应用的版本号: ?? private String getVersionName() throws Exception ?? { ?????????? // 获取packagemanager的实例 ?????????? PackageManager packageManager = getPackage...
分类:
移动开发 时间:
2014-10-18 15:38:09
阅读次数:
164
@Transactional(rollbackFor = { Exception.class }) 需要把异常抛出到带有@Transactional(rollbackFor = { Exception.class }) 这个注释的函数外面,回滚才能生效。出现错误:org.springframewor...
分类:
编程语言 时间:
2014-10-17 23:07:08
阅读次数:
389
/* try { int i = int.Parse(Console.ReadLine()); Console.Write("没有错误的话会执行:"+i+",");//运行正常,执行这里 } catch (Exception e) //出现错误会跳到这里 { Console.Write("程序出现未...
分类:
其他好文 时间:
2014-10-17 18:08:43
阅读次数:
135
在使用NSUserDefaults的时候插入数据有时候会报以下错误:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSUserDefaults setObject:forKey:]: attempt to insert non-property list ...
分类:
其他好文 时间:
2014-10-17 11:53:01
阅读次数:
182
以下内容整理自网络
1.问题描述
Tomcat在启动时出现如下异常问题:
严重: IOException while loading persisted sessions: java.io.EOFException
严重: Exception loading sessions from persistent storage
2.解决方案
删除T...
分类:
其他好文 时间:
2014-10-17 10:14:03
阅读次数:
152
events.js:72 throw er; // Unhandled 'error' event ^Error: listen EADDRINUSE at errnoException (net.js:904:11) at Server._lis...
分类:
其他好文 时间:
2014-10-17 10:00:42
阅读次数:
160
1、错误描述
Exception in thread "main" java.lang.IllegalArgumentException: Cannot format given Object as a Date
at java.text.DateFormat.format(DateFormat.java:301)
at java.text.Format.format(Format.java...
分类:
编程语言 时间:
2014-10-17 00:41:13
阅读次数:
346
/** * Return whether the given throwable is a checked exception: * that is, neither a RuntimeException nor an Error. * @param ex the t...
分类:
编程语言 时间:
2014-10-16 06:49:52
阅读次数:
259
/** * Return whether the given throwable is a checked exception: * that is, neither a RuntimeException nor an Error. * @param ex the t...
分类:
编程语言 时间:
2014-10-16 06:16:22
阅读次数:
207