added raiseerror for scripts.