diff options
-rw-r--r-- | buffer.cpp | 2 | ||||
-rw-r--r-- | throw.h | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -171,7 +171,7 @@ void Buffer::handleCommand(const Command &cmd){ cursor.x=screen[sp.y].cells[sp.x].linex; } } else { - THROW("Unknown command"); + THROW("Unknown command: "+cmd[0]); } } @@ -1,11 +1,13 @@ #pragma once +#include <string> #include <cstdio> using namespace std; #define THROW(desc) do { \ - fprintf(stderr,"THROW: %s\n",desc); \ + string _s(desc); \ + fprintf(stderr,"THROW: %s\n",_s.data()); \ __asm("int3\n\t"); \ } while(0) |