Custom errors functionality.