Skip to content

Commit

Permalink
Adding extra output to the error message from checkedCalloc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Craigacp committed Jan 7, 2017
1 parent 64944a8 commit 75e8876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ArrayOperations.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void* checkedCalloc(size_t vectorLength, size_t sizeOfType) {
/* This call returns control to Matlab, with the associated error message */
mexErrMsgTxt("Failed to allocate memory\n");
#elif defined(C_IMPLEMENTATION)
fprintf(stderr, "Error: %s\n", strerror(errno));
fprintf(stderr, "Error: %s\nAttempted to allocate %lu length of size %lu\n", strerror(errno), vectorLength, sizeOfType);
exit(EXIT_FAILURE);
#endif
}
Expand Down

0 comments on commit 75e8876

Please sign in to comment.