mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Log exceptions when timer fires
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20025 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5f8b76348f
commit
199542334a
2 changed files with 25 additions and 2 deletions
|
@ -196,11 +196,33 @@ static Class NSDate_class;
|
|||
{
|
||||
if (_selector == 0)
|
||||
{
|
||||
[(NSInvocation*)_target invoke];
|
||||
NS_DURING
|
||||
{
|
||||
[(NSInvocation*)_target invoke];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSLog(@"*** NSTimer ignoring exception '%@' (reason '%@') "
|
||||
@"raised during posting of timer with target %p and selector '%@'",
|
||||
[localException name], [localException reason], _target,
|
||||
NSStringFromSelector([_target selector]));
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
}
|
||||
else
|
||||
{
|
||||
[_target performSelector: _selector withObject: self];
|
||||
NS_DURING
|
||||
{
|
||||
[_target performSelector: _selector withObject: self];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSLog(@"*** NSTimer ignoring exception '%@' (reason '%@') "
|
||||
@"raised during posting of timer with target %p and selector '%@'",
|
||||
[localException name], [localException reason], _target,
|
||||
NSStringFromSelector(_selector));
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
}
|
||||
|
||||
if (_repeats == NO)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue