Question: How do you make www.homepage.com/app/shoppingcart look like www.homepage.com/shoppingcart -

how to rewrite the URL-s 

is there a url rewrite plugin for cakephp that does such things

Answer: 
The functionality of the two statements is exactly the same as long as an exception is not thrown -- the only difference between the two is that the `finally` block will be executed if an exception is thrown in the try block.
In your first code example the `someFunction()` will be executed always, even if the `try` block raises an `exception`. In that case, the `exception` block will be executed first and then the `finally` block. If no `exception` is raised then the `finally` block will be executed after the execution of the `try` block.

In the second code example the `someFunction()` will not be executed if the `sleep()` method will fail. Then the `exception` block is executed and the lines of code after the `sleep()` method will be skipped.