ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [10/43] ignite git commit: IGNITE-1282 Debug tests.
Date Thu, 26 Nov 2015 13:13:52 GMT
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 <akuznetsov@apache.org>
Authored: Tue Nov 24 15:15:04 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@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
     }
 


Mime
View raw message