You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by yz...@apache.org on 2015/11/26 14:13:52 UTC
[10/43] ignite git commit: IGNITE-1282 Debug tests.
IGNITE-1282 Debug tests.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b7518430
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b7518430
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b7518430
Branch: refs/heads/ignite-1.5-cache-get-opts
Commit: b75184304b03d8a7cba24473b550669ec95f7512
Parents: 1e732a0
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Tue Nov 24 15:15:04 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Tue Nov 24 15:15:04 2015 +0700
----------------------------------------------------------------------
.../scalar/examples/ScalarCacheExample.scala | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b7518430/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
index 0bf8d6f..32afab2 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
@@ -49,6 +49,10 @@ object ScalarCacheExample extends App {
basicOperations()
}
+ catch {
+ case e: Throwable =>
+ e.printStackTrace();
+ }
finally {
cache.destroy()
}
@@ -78,13 +82,20 @@ object ScalarCacheExample extends App {
// Put one more value.
c += (3.toString -> 11)
- // Get with option...
- c.opt(44.toString) match {
- case Some(v) => sys.error("Should never happen.")
- case None => println("Correct")
+ try {
+ c.opt(44.toString) match {
+ case Some(v) => sys.error("Should never happen.")
+ case _ => println("Correct")
+ }
}
+ catch {
+ case e: Throwable =>
+ e.printStackTrace()
+ }
+
// Print all values.
+ println("Print all values.")
c.iterator() foreach println
}