| New M-Lint Warning Related to the MException Class MATLAB Version 7.6 (R2008a) adds a new M-Lint warning related to the MException class. This warning, along with two M-Lint warnings added in MATLAB Version 7.5 (R2007b), intentionally make it difficult for you to completely ignore an error without receiving an M-Lint warning. It is a best practice to check error information even when an error is expected or frequent, so that you can rule out unexpected situations. The three messages are as follows—the first is the one added in MATLAB Version 7.6 (R2008a): • LASTERR and LASTERROR are better replaced by an identifier on the CATCH block. See doc CATCH. • The value assigned here to variable 'x' might never be used. This message appears when the code contains a catch statementthatis never used. • TRY statement without a CATCH. For example, suppose you want to read options from a file, options .txt, but it is acceptable if that file is not present. You might write the following code, expecting the read_options program to throw an error if the file is not present: options = {}; try options = read_options( "options.txt ); end |