How to defined error

Hello,

When process the error event, as mentioned in the document, I found that the error can be defined outside the process tag, but I can not find where to define that in the modeler. May I know where to define that in the modeler.

Thanks

I also have same question. How can we define an error in a process which can be referenced by error end event or error boundary event.
Also can the error definition contain dynamic error variable?