Skip to content

Commit

Permalink
Replace Parrot_ex_throw with fprintf(stderr) in CLI parsing. Part of …
Browse files Browse the repository at this point in the history
…TT#1436.

git-svn-id: https://svn.parrot.org/parrot/trunk@43933 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
bacek committed Feb 13, 2010
1 parent d7cc9ed commit adae42a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main.c
Expand Up @@ -398,19 +398,21 @@ parseflags(PARROT_INTERP,
else if (STREQ(opt.opt_arg, "gcdebug"))
*core = PARROT_GC_DEBUG_CORE;
else
Parrot_ex_throw_from_c_args(interp, NULL, 1,
fprintf(stderr,
"main: Unrecognized runcore '%s' specified."
"\n\nhelp: parrot -h\n", opt.opt_arg);
exit(EXIT_FAILURE);
break;
case 'g':
if (STREQ(opt.opt_arg, "ms"))
interp->gc_sys->sys_type = MS;
else if (STREQ(opt.opt_arg, "inf"))
interp->gc_sys->sys_type = INF;
else
Parrot_ex_throw_from_c_args(interp, NULL, 1,
fprintf(stderr,
"main: Unrecognized GC '%s' specified."
"\n\nhelp: parrot -h\n", opt.opt_arg);
exit(EXIT_FAILURE);
break;
case 't':
if (opt.opt_arg && is_all_hex_digits(opt.opt_arg))
Expand Down Expand Up @@ -438,6 +440,7 @@ parseflags(PARROT_INTERP,
exit(EXIT_FAILURE);
break;
case OPT_RUNTIME_PREFIX:
/* FIXME It will die. STRING subsystem isn't initialized yet */
Parrot_io_printf(interp, "%Ss\n",
Parrot_get_runtime_path(interp));
exit(EXIT_SUCCESS);
Expand Down Expand Up @@ -475,9 +478,10 @@ parseflags(PARROT_INTERP,
break;

/* PIRC flags handling goes here */
Parrot_ex_throw_from_c_args(interp, NULL, 1,
fprintf(stderr,
"main: Invalid flag '%s' used.\n\nhelp: parrot -h\n",
(*argv)[0]);
exit(EXIT_FAILURE);
}
}

Expand Down

0 comments on commit adae42a

Please sign in to comment.