Skip to content
Snippets Groups Projects
Commit 1b535fd9 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

more debug

Rev: src/dumpmodule.pike:1.5
parent b82cc99e
No related branches found
No related tags found
No related merge requests found
...@@ -92,13 +92,25 @@ class Codec ...@@ -92,13 +92,25 @@ class Codec
int quiet=0; int quiet=0;
Stdio.File logfile;
function log(string file, int line, string err)
{
logfile->write("================================================\n");
logfile->write(sprintf("%s:%d:%s\n",file,line,err));
}
int main(int argc, string *argv) int main(int argc, string *argv)
{ {
if(argv[1]=="--quiet") if(argv[1]=="--quiet")
{ {
quiet=1; quiet=1;
argv=argv[1..]; argv=argv[1..];
master()->set_inhibit_compile_errors(1); master()->set_inhibit_compile_errors(log);
// FIXME: Make this a command line option..
// It should not be done when running a binary dist
// installation...
logfile=Stdio.File("dumpmodule.log","cwt");
werror("Dumping modules "); werror("Dumping modules ");
} }
...@@ -152,9 +164,14 @@ int main(int argc, string *argv) ...@@ -152,9 +164,14 @@ int main(int argc, string *argv)
werror(master()->describe_backtrace(err)); werror(master()->describe_backtrace(err));
#else #else
if(quiet) if(quiet)
{
werror("X"); werror("X");
else err[0]="While dumping "+file+": "+err[0];
logfile->write("================================================\n");
logfile->write(master()->describe_backtrace(err));
}else{
werror(err[0]); werror(err[0]);
}
#endif #endif
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment