Changed more messages to warnings/errors

svn-id: r38621
This commit is contained in:
Filippos Karapetis 2009-02-20 20:39:02 +00:00
parent 1419024bd0
commit 2ddce51a56
56 changed files with 532 additions and 523 deletions

View file

@ -74,14 +74,14 @@ static inline reg_t *
validate_property(object_t *obj, int index) {
if (!obj) {
if (sci_debug_flags & 4)
sciprintf("[VM] Sending to disposed object!\n");
sciprintf("[VM] Sending to disposed object");
_dummy_register = NULL_REG;
return &_dummy_register;
}
if (index < 0 || index >= obj->variables_nr) {
if (sci_debug_flags & 4)
sciprintf("[VM] Invalid property #%d (out of [0..%d]) requested!\n", index,
sciprintf("[VM] Invalid property #%d (out of [0..%d]) requested", index,
obj->variables_nr);
_dummy_register = NULL_REG;
@ -595,12 +595,12 @@ add_exec_stack_entry(state_t *s, reg_t pc, stack_ptr_t sp, reg_t objp, int argc,
void
vm_handle_fatal_error(state_t *s, int line, const char *file) {
fprintf(stderr, "Fatal VM error in %s, L%d; aborting...\n", file, line);
error("Fatal VM error in %s, L%d; aborting...\n", file, line);
#ifdef HAVE_SETJMP_H
if (jump_initialized)
longjmp(vm_error_address, 0);
#endif
fprintf(stderr, "Could not recover, exitting...\n");
error("Could not recover, exitting...\n");
exit(1);
}
@ -740,7 +740,7 @@ run_vm(state_t *s, int restoring) {
scr = script_locate_by_segment(s, xs->addr.pc.segment);
if (!scr) {
/* No script? Implicit return via fake instruction buffer */
warning("Running on non-existant script in segment %x!\n", xs->addr.pc.segment);
warning("Running on non-existant script in segment %x", xs->addr.pc.segment);
code_buf = _fake_return_buffer;
#ifndef DISABLE_VALIDATIONS
code_buf_size = 2;
@ -887,7 +887,7 @@ run_vm(state_t *s, int restoring) {
/* Pointer arithmetics! */
if (s->r_acc.segment) {
if (r_temp.segment) {
sciprintf("Error: Attempt to add two pointers, stack="PREG" and acc="PREG"!\n",
sciprintf("Error: Attempt to add two pointers, stack="PREG" and acc="PREG"",
PRINT_REG(r_temp), PRINT_REG(s->r_acc));
script_debug_flag = script_error_flag = 1;
offset = 0;
@ -914,7 +914,7 @@ run_vm(state_t *s, int restoring) {
/* Pointer arithmetics! */
if (s->r_acc.segment) {
if (r_temp.segment) {
sciprintf("Error: Attempt to subtract two pointers, stack="PREG" and acc="PREG"!\n",
sciprintf("Error: Attempt to subtract two pointers, stack="PREG" and acc="PREG"",
PRINT_REG(r_temp), PRINT_REG(s->r_acc));
script_debug_flag = script_error_flag = 1;
offset = 0;