Disabling Error Text

If you don't want any error messages at all (without an addon) use these commands:

/run SLASH_UI_ERRORS_OFF1 = "/erroff"
/erroff
This will disable the red text and the error sounds and speech.

If you want to selectively disable errors, define /erroff and /erron somewhere:
/run SLASH_UI_ERRORS_OFF1 = "/erroff"
/run SLASH_UI_ERRORS_ON1 = "/erron"

then make macros for the abilities you want to spam like this:

#showtooltip
/erroff
/cast SomeSpell
/erron

The text above was copied from a post by Arrek in the WoW forums found here.