Permalink
Browse files

Matlab error message when tensor load fails. (#23)

  • Loading branch information...
ShadenSmith committed Mar 17, 2017
1 parent 3eb5ce4 commit 345a0a4dcb6f2c50e00bc7be59934090d215a9ed
Showing with 6 additions and 1 deletion.
  1. +6 −1 matlab/splatt_shared.h
View
@@ -353,7 +353,12 @@ static splatt_csf * p_parse_tensor(
if(mxIsChar(args[0])) {
char * fname = (char *) mxArrayToString(args[0]);
splatt_csf_load(fname, nmodes, &tt, cpd_opts);
int err = splatt_csf_load(fname, nmodes, &tt, cpd_opts);
if(err != SPLATT_SUCCESS) {
mexErrMsgIdAndTxt("SPLATT:FileNotFound",
"Could not load file '%s'.\n", fname);
}
mxFree(fname);
} else if(nargs > 1 && mxIsNumeric(args[0]) && mxIsNumeric(args[1])) {
tt = p_convert_sptensor(args[0], args[1], nmodes, cpd_opts);

0 comments on commit 345a0a4

Please sign in to comment.