aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-11-18 00:58:25 +1000
committerGravatar axel <axel@liljencrantz.se>2006-11-18 00:58:25 +1000
commit54244fd33dc172d6d7aa15eefa06f8685e3fef49 (patch)
treec222384301268cecb73acc9d6e4b5fb8ecbe8e14 /parser.c
parent4c1d1bb218301ceadd137cb7cc53a5605fd87317 (diff)
Add a bugreport function for writing out a message about how to file bug reports
darcs-hash:20061117145825-ac50b-0480300cce24657aae9572b79f145d956db93593.gz
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/parser.c b/parser.c
index 689d8ad4..4460c2d1 100644
--- a/parser.c
+++ b/parser.c
@@ -57,12 +57,6 @@ The fish parser. Contains functions for parsing code.
#define MAX_RECURSION_DEPTH 128
/**
- Message about reporting bugs, used on weird internal error to
- hopefully get them to report stuff.
-*/
-#define BUGREPORT_MSG _( L"If this error can be reproduced, please send a bug report to %s.")
-
-/**
Error message for improper use of the exec builtin
*/
#define EXEC_ERR_MSG _(L"This command can not be used in a pipeline")
@@ -474,11 +468,9 @@ void parser_pop_block()
if( !current_block )
{
debug( 1,
- L"function %s called on empty block stack. "
- L"This is a bug. "
- L"If you can reproduce it, please send a bug report to %s.",
- __func__,
- PACKAGE_BUGREPORT ); \
+ L"function %s called on empty block stack.",
+ __func__);
+ bugreport();
return;
}
@@ -2521,9 +2513,7 @@ int eval( const wchar_t *cmd, io_data_t *io, int block_type )
{
debug( 1,
EVAL_NULL_ERR_MSG );
- debug( 1,
- BUGREPORT_MSG,
- PACKAGE_BUGREPORT );
+ bugreport();
return 1;
}
@@ -2533,10 +2523,7 @@ int eval( const wchar_t *cmd, io_data_t *io, int block_type )
debug( 1,
INVALID_SCOPE_ERR_MSG,
parser_get_block_desc( block_type ) );
-
- debug( 1,
- BUGREPORT_MSG,
- PACKAGE_BUGREPORT );
+ bugreport();
return 1;
}
@@ -2570,9 +2557,7 @@ int eval( const wchar_t *cmd, io_data_t *io, int block_type )
{
debug( 0,
_(L"End of block mismatch. Program terminating.") );
- debug( 0,
- BUGREPORT_MSG,
- PACKAGE_BUGREPORT );
+ bugreport();
exit(1);
break;
}