Skip to content
Snippets Groups Projects
Commit edf84ac9 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

GtTaskStatistics: added safety check

parent 60db73e8
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,10 @@ classdef GtTasksStatistics < handle
end
function add_task_partial(self, name, partial_name, description)
if (~isfield(self.entries, name))
error('GtTasksStatistics:wrong_argument', ...
'Task name "%s" does not exist!', name)
end
self.entries.(name).partials.(partial_name) ...
= struct('description', description, 'timestamps', [], 'timer_tic', 0);
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment