Skip to content

Remove 'warning off' #15

Open
Open
@RomeshA

Description

@RomeshA

In general, the pattern

warning off
stuff()
warning on    

this can lead to unpredictable behaviour (specifically, other unrelated warnings unexpectedly not being raised) if an error occurs while running stuff(). It would be better to check explicitly for the warning conditions. For example, instead of

warning off
mkdir(dirname)
warning on

it should read

if ~exist(dirname,'dir')
    mkdir(dirname)
end

This needs to be replaced in a number of places. As a somewhat weaker alternative, in some places specific warnings could be disabled instead of all warnings e.g. suppressing divide by zero warnings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions