Throw common error if no effect is declared