According to PHP’s exec quickref, you can pass pointers in to get the output and status of the command.
<?php
exec('C://abc//wkhtmltopdf home.html sample.pdf', $output, $return);
// Return will return non-zero upon an error
if (!$return) {
echo "PDF Created Successfully";
} else {
echo "PDF not created";
}
?>
If you want to enumerate the possible errors, you can find the codes over at hiteksoftware