mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
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:
parent
c42786a028
commit
e2a743a218
2 changed files with 22 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue