Mercurial > repos > public > matlab_path_manager
comparison +mpm/subpaths.m @ 8:f37b4c00a863
Add better error message for missing .subpaths
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 10 Sep 2018 17:29:26 +0200 |
parents | 19c4af287596 |
children |
comparison
equal
deleted
inserted
replaced
7:309cc6c0cd75 | 8:f37b4c00a863 |
---|---|
1 function sp = subpaths(d) | 1 function sp = subpaths(d) |
2 if ~exist('d', 'var') || isempty(d) | 2 if ~exist('d', 'var') || isempty(d) |
3 d = ''; | 3 d = ''; |
4 end | 4 end |
5 | 5 |
6 % TODO: Nice error message if file doesn't exist | 6 try |
7 fstr = fileread(fullfile(d, '.subpaths')); | 7 fstr = fileread(fullfile(d, '.subpaths')); |
8 catch | |
9 error('Subpath definition file ''.subpaths'' not found.') | |
10 end | |
8 sp = splitlines(strtrim(fstr)); | 11 sp = splitlines(strtrim(fstr)); |
9 end | 12 end |