Don't pass %@ directives to printf(); use %s and -cStringNoCopy instead.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1835 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-09-25 13:44:33 +00:00
parent c42786a028
commit e2a743a218
2 changed files with 22 additions and 13 deletions

View file

@ -66,18 +66,18 @@ int main(int argc, char *argv[])
}
}
/* Cause an exception, and watch it return to us. */
/* Cause an exception in the server, and watch it return to us. */
NS_DURING
{
[remote_array objectAtIndex: 99];
}
NS_HANDLER
{
printf("Caught our exception\n"
"NAME: %@\n"
"REASON: %@\n",
[localException name],
[localException reason]);
printf("Exceptions are working; caught exception:\n"
"NAME: %s\n"
"REASON: %s\n",
[[localException name] cStringNoCopy],
[[localException reason] cStringNoCopy]);
[localException release];
}
NS_ENDHANDLER