determines which error message must be thrown depending on the index passed in which corresponds to the index's in the enum 'EXCEPTIONS_MSG'