Gas limit can (conceivably) be set to whatever value you want--the transaction will use whatever gas it uses and any amount of gas over what is used will be refunded---except---and this is a very important exception--if the transaction fails (because of an
throw for example).
If the transaction throws, you will not get an error message of any kind other than 'out of gas,' because what happens when a
assert hits is all the remaining gas (up to the gas limit) is consumed and the transaction returns (that's why I said gas limit matters--it matters when it fails--it doesn't matter when it doesn't). But @smarx is right--let Metamask make the setting.
Once you've spent the gas, you can't get it back. Think of it this way--the machine that mined the block did the work to decide if the transaction succeeded or not. That machine (i.e. the miner) should not be penalized because you ran a function that failed. The function ran--that cost the miner money--he/she should get paid.
The total cost of the transaction (just FYI) is
gas used *