core: Use unique assert_msg.
* src/mes.c (error): Use unique assert_msg.
This commit is contained in:
parent
1a75158c35
commit
a758a5a6a6
|
@ -877,7 +877,11 @@ begin_expand:
|
|||
else if (TYPE (R1) == TPORT)
|
||||
input = set_current_input_port (R1);
|
||||
else
|
||||
assert_msg (0, "0");
|
||||
{
|
||||
eputs ("begin_expand failed, R1=");
|
||||
display_error_ (R1);
|
||||
assert_msg (0, "begin-expand-boom 0");
|
||||
}
|
||||
|
||||
push_cc (input, R2, R0, cell_vm_return);
|
||||
x = read_input_file_env (R0);
|
||||
|
|
15
src/hash.c
15
src/hash.c
|
@ -46,24 +46,27 @@ hashq_ (SCM x, long size)
|
|||
int
|
||||
hash_ (SCM x, long size)
|
||||
{
|
||||
if (TYPE (x) == TSTRING)
|
||||
return hash_cstring (cell_bytes (STRING (x)), size);
|
||||
assert_msg (0, "0");
|
||||
return hashq_ (x, size);
|
||||
if (TYPE (x) != TSTRING)
|
||||
{
|
||||
eputs ("hash_ failed, not a string:");
|
||||
display_error_ (x);
|
||||
assert_msg (0, "0");
|
||||
}
|
||||
return hash_cstring (cell_bytes (STRING (x)), size);
|
||||
}
|
||||
|
||||
SCM
|
||||
hashq (SCM x, SCM size)
|
||||
{
|
||||
eputs ("hashq not supporteed\n");
|
||||
assert_msg (0, "0");
|
||||
return make_number (hashq_ (x, VALUE (size)));
|
||||
}
|
||||
|
||||
SCM
|
||||
hash (SCM x, SCM size)
|
||||
{
|
||||
eputs ("hash not supporteed\n");
|
||||
assert_msg (0, "0");
|
||||
return make_number (hash_ (x, VALUE (size)));
|
||||
}
|
||||
|
||||
SCM
|
||||
|
|
|
@ -182,16 +182,16 @@ length (SCM x)
|
|||
SCM
|
||||
error (SCM key, SCM x)
|
||||
{
|
||||
#if !__MESC_MES__
|
||||
SCM throw;
|
||||
if ((throw = module_ref (R0, cell_symbol_throw)) != cell_undefined)
|
||||
#if !__MESC_MES__ && !__M2_PLANET__
|
||||
SCM throw = module_ref (R0, cell_symbol_throw);
|
||||
if (throw != cell_undefined)
|
||||
return apply (throw, cons (key, cons (x, cell_nil)), R0);
|
||||
#endif
|
||||
display_error_ (key);
|
||||
eputs (": ");
|
||||
write_error_ (x);
|
||||
eputs ("\n");
|
||||
assert_msg (0, "0");
|
||||
assert_msg (0, "ERROR");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue