Back to the main page.

Bug 3324 - ft_warning and backtrace

Status CLOSED FIXED
Reported 2017-07-17 13:02:00 +0200
Modified 2019-08-10 12:40:50 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P5 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Guillaume - 2017-07-17 13:02:02 +0200

ft_warning does not seem to take into account the setting from warning('backtrace'): ---- file testme.m ---- function testme callme; function callme ft_warning('warn'); ----------------------- >> warning backtrace on >> testme Warning: warn In '/home/testmeft.m' at line 6 In '/home/testmeft.m' at line 3 and FieldTrip's own function has to be called explicitly: >> ft_warning off backtrace >> testme Warning: warn


Guillaume - 2017-07-18 12:19:07 +0200

After using ft_warning('off','backtrace'), some of the warnings now get displayed like this: Warning: FieldTrip:remoteParallelFunction:make_general_channel/channel_general:spm_eeg_convert:spm_eeg_convert:ft_read_event:read_trigger:line85 Warning: Could not read events from file ...


Robert Oostenveld - 2017-08-14 15:59:21 +0200

(In reply to Guillaume from comment #0) regarding the backtrace: I will check for ft_warning whether backtrace and verbose are unset, in which case the default will be obtained from "warning". That default will be cleared at the end of the function, so that on the next call the default can be something else (if it was changed with "warning" in between). mac011> git commit utilities/private/ft_notification.m [bug3324-backtrace 4f7c3ee] honor the defaults for the backtrace and verbose from the standard MATLAB warning function, see http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3324#c0 1 file changed, 46 insertions(+), 12 deletions(-)


Robert Oostenveld - 2017-08-14 16:00:43 +0200

(In reply to Robert Oostenveld from comment #2) created and merged https://github.com/fieldtrip/fieldtrip/pull/489


Robert Oostenveld - 2017-08-14 16:25:12 +0200

(In reply to Guillaume from comment #1) regarding the FieldTrip:remoteParallelFunction:make_general_channel/channel_general:spm_eeg_convert:spm_eeg_convert:ft_read_event:read_trigger:line85 message ID. The ID is auto generated, but should only include the FT functions. It should be FieldTrip:ft_read_event:read_trigger:line85 Ok, I fixed it. I created and merged https://github.com/fieldtrip/fieldtrip/pull/490


Robert Oostenveld - 2019-08-10 12:34:40 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.


Robert Oostenveld - 2019-08-10 12:40:50 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.