Standard LibraryTypesErrorMethodswhatOn this pagewhat Method of Error. what() -> string Returns the error message of the exception. Returns The error message as a string.