What line am I? PHP

I’m using Dreamweaver to code. On the code, if something goes wrong, I echo an error message. Like:

if(something goes wrong)
exit(“Please go back and try again.”);

I would like to also echo the line number on the error message, so it will be easier to find what failed while debugging.

Is there a way to do something like…

if(something goes wrong)
exit("Please go back and try again. " . printline);

Thanks in advance,

Leo