assert: add some debug info in the message
This commit is contained in:
parent
4497767492
commit
2f9e061252
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
#include "exception.hh"
|
#include "exception.hh"
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
namespace Kakoune
|
namespace Kakoune
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -17,7 +20,9 @@ private:
|
||||||
|
|
||||||
void on_assert_failed(const char* message)
|
void on_assert_failed(const char* message)
|
||||||
{
|
{
|
||||||
int res = system(("xmessage -buttons 'quit:0,ignore:1' '"_str + message + "'").c_str());
|
String debug_info = "pid: " + int_to_str(getpid());
|
||||||
|
int res = system(("xmessage -buttons 'quit:0,ignore:1' '"_str +
|
||||||
|
message + "\n[Debug Infos]\n" + debug_info + "'").c_str());
|
||||||
switch (res)
|
switch (res)
|
||||||
{
|
{
|
||||||
case -1:
|
case -1:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user