summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2017-06-15 23:14:10 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-07-13 18:25:43 -0300
commit8941989cb856be3b8ee93b8636e36f3e52672db4 (patch)
tree19e75359139cf30312404866c8486edee39d627b
parente0772f6005ff2f87c6d4bee38fdccbf616568b90 (diff)
eina_mono: add error handling with objects to Eina Error example
-rw-r--r--src/examples/efl_mono/EinaError01.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/examples/efl_mono/EinaError01.cs b/src/examples/efl_mono/EinaError01.cs
index 3aecc9a052..93f7be4e24 100644
--- a/src/examples/efl_mono/EinaError01.cs
+++ b/src/examples/efl_mono/EinaError01.cs
@@ -31,6 +31,7 @@ public class ExampleEinaError01
31 public static void Main() 31 public static void Main()
32 { 32 {
33 eina.Config.Init(); 33 eina.Config.Init();
34 efl.eo.Config.Init();
34 35
35 // Handling Eina_Error with exception 36 // Handling Eina_Error with exception
36 try 37 try
@@ -67,6 +68,18 @@ public class ExampleEinaError01
67 WriteLine("Unspected error!!!"); 68 WriteLine("Unspected error!!!");
68 } 69 }
69 70
71 // With object
72 try
73 {
74 var obj = new example.NumberwrapperConcrete();
75 obj.callback_call();
76 }
77 catch (efl.EflException e)
78 {
79 WriteLine("Exception message: " + e.Message);
80 }
81
82
70 WriteLine("No error message is empty string: \"{0}\"", eina.Error.NO_ERROR.Message); 83 WriteLine("No error message is empty string: \"{0}\"", eina.Error.NO_ERROR.Message);
71 WriteLine("No error message is empty string: \"{0}\"", eina.Error.MsgGet(0)); 84 WriteLine("No error message is empty string: \"{0}\"", eina.Error.MsgGet(0));
72 } 85 }