diff tests/libclient/js-rectangle/main.cpp @ 63:96ba0c5cf893

Misc: update duktape.hpp to new style
author David Demelier <markand@malikania.fr>
date Fri, 16 Dec 2016 16:11:24 +0100
parents fe7e3524e571
children 858621081b95
line wrap: on
line diff
--- a/tests/libclient/js-rectangle/main.cpp	Fri Dec 16 15:38:45 2016 +0100
+++ b/tests/libclient/js-rectangle/main.cpp	Fri Dec 16 16:11:24 2016 +0100
@@ -23,7 +23,7 @@
 
 class test_rectangle {
 protected:
-    UniqueContext m_ctx;
+    dukx_context m_ctx;
 
 public:
     test_rectangle()
@@ -55,7 +55,7 @@
         );
 
         if (ret != 0) {
-            throw dukx_exception(m_ctx, -1);
+            throw dukx_get_exception(m_ctx, -1);
         }
 
         duk_get_global_string(m_ctx, "x");
@@ -87,7 +87,7 @@
         );
 
         if (ret != 0) {
-            throw dukx_exception(m_ctx, -1);
+            throw dukx_get_exception(m_ctx, -1);
         }
 
         duk_get_global_string(m_ctx, "x");
@@ -119,7 +119,7 @@
         );
 
         if (ret != 0) {
-            throw dukx_exception(m_ctx, -1);
+            throw dukx_get_exception(m_ctx, -1);
         }
 
         duk_get_global_string(m_ctx, "x");
@@ -151,7 +151,7 @@
         );
 
         if (ret != 0) {
-            throw dukx_exception(m_ctx, -1);
+            throw dukx_get_exception(m_ctx, -1);
         }
 
         duk_get_global_string(m_ctx, "x");
@@ -193,7 +193,7 @@
         );
 
         if (ret != 0) {
-            throw dukx_exception(m_ctx, -1);
+            throw dukx_get_exception(m_ctx, -1);
         }
 
         duk_get_global_string(m_ctx, "name");
@@ -220,7 +220,7 @@
         );
 
         if (ret != 0) {
-            throw dukx_exception(m_ctx, -1);
+            throw dukx_get_exception(m_ctx, -1);
         }
 
         duk_get_global_string(m_ctx, "name");
@@ -265,7 +265,7 @@
         auto ret = duk_peval_string(m_ctx, "build({ x: 50, y: 80, width: 100, height: 200 });");
 
         if (ret != 0) {
-            throw dukx_exception(m_ctx, -1);
+            throw dukx_get_exception(m_ctx, -1);
         }
 
         duk_get_global_string(m_ctx, "x");
@@ -305,7 +305,7 @@
         );
 
         if (ret != 0) {
-            throw dukx_exception(m_ctx, -1);
+            throw dukx_get_exception(m_ctx, -1);
         }
 
         duk_get_global_string(m_ctx, "name");
@@ -349,7 +349,7 @@
         auto ret = duk_peval_string(m_ctx, "build({});");
 
         if (ret != 0) {
-            throw dukx_exception(m_ctx, -1);
+            throw dukx_get_exception(m_ctx, -1);
         }
 
         duk_get_global_string(m_ctx, "x");