function deletePoolNoThrow(varargin)
%   For internal use only

%   Copyright 2014-2020 The MathWorks, Inc.

try
    if nargin == 1 && ~isempty(varargin{1})
        pool = varargin{1};
    else
        pool = gcp('nocreate');
    end
    delete(pool);
catch err
    dctSchedulerMessage(1, ['Calling delete method failed due to the following ', ...
        'error:\n%s\n Most likely the pool had not been created yet'], err.message);
end
end
