Cryptic error message

Cryptic error message

I created a function that creates a new record, which I call from a view. But when I try to execute it I get this cryptic error message:

Error details:
Error occured while executing the script.
Error occured.

This gives me no hint as to what the error can be. Any ideas?