| 31 | namespace sol { |
| 32 | namespace detail { |
| 33 | inline void stack_fail(int, int) { |
| 34 | #if SOL_IS_ON(SOL_EXCEPTIONS) |
| 35 | throw error(detail::direct_error, "imbalanced stack after operation finish"); |
| 36 | #else |
| 37 | // Lol, what do you want, an error printout? :3c |
| 38 | // There's no sane default here. The right way would be C-style abort(), and that's not acceptable, so |
| 39 | // hopefully someone will register their own stack_fail thing for the `fx` parameter of stack_guard. |
| 40 | #endif // No Exceptions |
| 41 | } |
| 42 | } // namespace detail |
| 43 | |
| 44 | struct stack_guard { |