Added error handling in constructor of SdlWindow class