Fix #356: many occurrences of throw RuntimeException in metamodel

Introduced ModelError
metamodel: rethrow exception in user code for #356
Metamodel: fix exception type for apply for #356