What is the difference between Exception::getMessage and Exception::getLine?

  • getMessage returns the error message associated with the exception, while getLine returns the line number where the exception occurred
  • getMessage returns the line number where the exception occurred, while getLine returns the error message associated with the exception
  • They both return the same information
  • They are not valid methods in the Exception class
Exception::getMessage returns the error message associated with the exception, while Exception::getLine returns the line number where the exception occurred. They provide different information about the exception. Learn more: http://php.net/manual/en/class.exception.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *