Is this the right way to handle Exceptions in PHP?
You are using Exceptions correctly, however its possible to catch more than one type of exception with the same try block. Instead of specifically catching the LinkException in your logging routine, you should probably just catch any Exception, but prefix the error string with the Exception's class.

I also recommend putting the declaration of the $link object inside the try block in case the Url class throws an exception from inside the Link class's constructor.

try {
    // execute code
    $foo = new Foo();
} catch ( \Exception $e ) {
    // log exceptions
    $logger-&gt;add( get_class( $e ) . ': ' . $e-&gt;getMessage() );
}


Push your logging as high up in your application as possible so you are collecting all exceptions, not just your custom ones.