Is there any way to hide runtime errors from the user because i have some code that gives a runtime error but it still works correctly.
Okay, first of all, if you have an error, you should be fixing it, not hiding it.
If you don't have any errors, and you want to setup the game so that it masks any unexpected errors that you didn't know were there, make sure none of your output controls are set to "default" and set client.control_freak = 1 to disable the options and messages window.