Update Library/Database.php

Added exception code.