Refactor some exceptions handling

Moves most of the catch block
from sequentialdocuments_controller
to /view.php

Add a new exception
class: inexistent_entity_exception

Fix some throw instructions