Catch harp errors
Provisional solution with private variables in _layout