error handeling library basic structure