mirror of https://github.com/swig/swig
Few error message improvements and consistency tweaks
This commit is contained in:
parent
3cda507e57
commit
936767da8e
|
@ -25,7 +25,7 @@ void DohDelete(DOH *obj) {
|
|||
if (!obj)
|
||||
return;
|
||||
if (!DohCheck(b)) {
|
||||
fputs("Fatal internal error: Attempt to delete a non-DOH object.\n", stderr);
|
||||
fputs("Internal error: Attempt to delete a non-DOH object.\n", stderr);
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
if (b->flag_intern)
|
||||
|
@ -55,7 +55,7 @@ DOH *DohCopy(const DOH *obj) {
|
|||
if (!obj)
|
||||
return 0;
|
||||
if (!DohCheck(b)) {
|
||||
fputs("Fatal internal error: Attempt to copy a non-DOH object.\n", stderr);
|
||||
fputs("Internal error: Attempt to copy a non-DOH object.\n", stderr);
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
objinfo = b->type;
|
||||
|
|
|
@ -449,7 +449,7 @@ public:
|
|||
Printf(f_init, "}\n");
|
||||
break;
|
||||
default:
|
||||
fputs("Fatal internal error: Invalid Guile linkage setting.\n", stderr);
|
||||
Printf(stderr, "Internal error: Invalid Guile linkage setting.\n");
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
@ -473,7 +473,7 @@ int Preprocessor_expr(DOH *s, int *error) {
|
|||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Internal error in expression evaluator.\n");
|
||||
Printf(stderr, "Internal error in expression evaluator.\n");
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -322,7 +322,7 @@ void Swig_require(const char *ns, Node *n, ...) {
|
|||
}
|
||||
obj = Getattr(n, name);
|
||||
if (!opt && !obj) {
|
||||
Swig_error(Getfile(n), Getline(n), "Fatal error (Swig_require). Missing attribute '%s' in node '%s'.\n", name, nodeType(n));
|
||||
Swig_error(Getfile(n), Getline(n), "Internal error (Swig_require). Missing attribute '%s' in node '%s'.\n", name, nodeType(n));
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
if (!obj)
|
||||
|
|
|
@ -390,7 +390,7 @@ SwigType *SwigType_del_pointer(SwigType *t) {
|
|||
c++;
|
||||
}
|
||||
if (strncmp(c, "p.", 2)) {
|
||||
printf("Fatal error: SwigType_del_pointer applied to non-pointer.\n");
|
||||
Printf(stderr, "Internal error: SwigType_del_pointer applied to non-pointer type %s.\n", t);
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
Delslice(t, 0, (int)((c - s) + 2));
|
||||
|
@ -434,7 +434,7 @@ SwigType *SwigType_add_reference(SwigType *t) {
|
|||
SwigType *SwigType_del_reference(SwigType *t) {
|
||||
char *c = Char(t);
|
||||
if (strncmp(c, "r.", 2)) {
|
||||
printf("Fatal error: SwigType_del_reference applied to non-reference.\n");
|
||||
Printf(stderr, "Internal error: SwigType_del_reference applied to non-reference type %s.\n", t);
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
Delslice(t, 0, 2);
|
||||
|
@ -471,7 +471,7 @@ SwigType *SwigType_add_rvalue_reference(SwigType *t) {
|
|||
SwigType *SwigType_del_rvalue_reference(SwigType *t) {
|
||||
char *c = Char(t);
|
||||
if (strncmp(c, "z.", 2)) {
|
||||
fprintf(stderr, "Fatal error: SwigType_del_rvalue_reference() applied to non-rvalue-reference.\n");
|
||||
Printf(stderr, "Internal error: SwigType_del_rvalue_reference() applied to non-rvalue-reference type %s.\n", t);
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
Delslice(t, 0, 2);
|
||||
|
@ -508,7 +508,7 @@ SwigType *SwigType_add_variadic(SwigType *t) {
|
|||
SwigType *SwigType_del_variadic(SwigType *t) {
|
||||
char *c = Char(t);
|
||||
if (strncmp(c, "v.", 2)) {
|
||||
printf("Fatal error: SwigType_del_variadic applied to non-variadic.\n");
|
||||
Printf(stderr, "Internal error: SwigType_del_variadic applied to non-variadic type %s.\n", t);
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
Delslice(t, 0, 2);
|
||||
|
@ -714,7 +714,7 @@ SwigType *SwigType_add_array(SwigType *t, const_String_or_char_ptr size) {
|
|||
SwigType *SwigType_del_array(SwigType *t) {
|
||||
char *c = Char(t);
|
||||
if (strncmp(c, "a(", 2)) {
|
||||
fprintf(stderr, "Fatal error: SwigType_del_array() applied to non-array.\n");
|
||||
Printf(stderr, "Internal error: SwigType_del_array() applied to non-array type %s.\n", t);
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
Delslice(t, 0, element_size(c));
|
||||
|
@ -810,7 +810,7 @@ void SwigType_array_setdim(SwigType *t, int n, const_String_or_char_ptr rep) {
|
|||
|
||||
start = c;
|
||||
if (strncmp(c, "a(", 2)) {
|
||||
fprintf(stderr, "Fatal error: SwigType_array_type applied to non-array.\n");
|
||||
Printf(stderr, "Internal error: SwigType_array_type applied to non-array type %s.\n", t);
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -920,7 +920,7 @@ SwigType *SwigType_pop_function(SwigType *t) {
|
|||
c = Char(t);
|
||||
}
|
||||
if (strncmp(c, "f(", 2)) {
|
||||
fprintf(stderr, "Fatal error. SwigType_pop_function applied to non-function.\n");
|
||||
Printf(stderr, "Internal error. SwigType_pop_function applied to non-function type %s.\n", t);
|
||||
Exit(EXIT_FAILURE);
|
||||
}
|
||||
g = SwigType_pop(t);
|
||||
|
|
Loading…
Reference in New Issue