aboutsummaryrefslogtreecommitdiff
path: root/src/linda.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/linda.cpp')
-rw-r--r--src/linda.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/linda.cpp b/src/linda.cpp
index bc931ac..67a97c2 100644
--- a/src/linda.cpp
+++ b/src/linda.cpp
@@ -146,14 +146,14 @@ static void check_key_types(lua_State* L, int start_, int end_)
146 { 146 {
147 if (key.equals(L, i)) 147 if (key.equals(L, i))
148 { 148 {
149 luaL_error(L, "argument #%d: can't use %s as a key", i, key.m_debugName); // doesn't return 149 raise_luaL_error(L, "argument #%d: can't use %s as a key", i, key.m_debugName);
150 break; 150 break;
151 } 151 }
152 } 152 }
153 } 153 }
154 break; 154 break;
155 } 155 }
156 luaL_error(L, "argument #%d: invalid key type (not a boolean, string, number or light userdata)", i); // doesn't return 156 raise_luaL_error(L, "argument #%d: invalid key type (not a boolean, string, number or light userdata)", i);
157 } 157 }
158} 158}
159 159
@@ -247,7 +247,7 @@ LUAG_FUNC(linda_send)
247 } 247 }
248 else 248 else
249 { 249 {
250 return luaL_error(L, "no data to send"); 250 raise_luaL_error(L, "no data to send");
251 } 251 }
252 } 252 }
253 253
@@ -331,7 +331,7 @@ LUAG_FUNC(linda_send)
331 331
332 if (!pushed.has_value()) 332 if (!pushed.has_value())
333 { 333 {
334 luaL_error(L, "tried to copy unsupported types"); // doesn't return 334 raise_luaL_error(L, "tried to copy unsupported types");
335 } 335 }
336 336
337 switch (cancel) 337 switch (cancel)
@@ -410,7 +410,7 @@ LUAG_FUNC(linda_receive)
410 ++expected_pushed_max; 410 ++expected_pushed_max;
411 if (expected_pushed_min > expected_pushed_max) 411 if (expected_pushed_min > expected_pushed_max)
412 { 412 {
413 return luaL_error(L, "batched min/max error"); 413 raise_luaL_error(L, "batched min/max error");
414 } 414 }
415 } 415 }
416 else 416 else
@@ -496,7 +496,7 @@ LUAG_FUNC(linda_receive)
496 496
497 if (!pushed.has_value()) 497 if (!pushed.has_value())
498 { 498 {
499 return luaL_error(L, "tried to copy unsupported types"); 499 raise_luaL_error(L, "tried to copy unsupported types");
500 } 500 }
501 501
502 switch (cancel) 502 switch (cancel)
@@ -716,7 +716,7 @@ LUAG_FUNC(linda_cancel)
716 } 716 }
717 else 717 else
718 { 718 {
719 return luaL_error(L, "unknown wake hint '%s'", who); 719 raise_luaL_error(L, "unknown wake hint '%s'", who);
720 } 720 }
721 return 0; 721 return 0;
722} 722}
@@ -798,7 +798,7 @@ LUAG_FUNC(linda_concat)
798 } 798 }
799 if (!atLeastOneLinda) // should not be possible 799 if (!atLeastOneLinda) // should not be possible
800 { 800 {
801 return luaL_error(L, "internal error: linda_concat called on non-Linda"); 801 raise_luaL_error(L, "internal error: linda_concat called on non-Linda");
802 } 802 }
803 lua_concat(L, 2); 803 lua_concat(L, 2);
804 return 1; 804 return 1;