Externals have both "pass" and "error" arguments passed to their functions.

Try setting one (or both) to true- I haven't experimented with them myself, but I assume that one passes the message and the other throws an error.

Most of my externals look something like:

void magicExternal(char *args[], int nargs, char **retstring, Bool *pass, Bool *error) {
char* retstr = (32);
sprintf(retstr, "My favorite number is %d", atol(args[0]));
...

cleanup:


*error = false;
*pass = false;


if (retstr == NULL) retstr = (1);


*retstring = (char*)calloc(strlen(retstr) + 1 ,1);


BlockMoveData(retstr, *retstring, strlen(retstr));


free(retstr);
}


Try throwing in a "true" for error and see what happens!

Brian

Is there a way to throw from an external and have it caught in Transcript?

Dar Scott

Reply via email to