NSError to generic
refactoring
refactoring catch
fix catch chain