How to Convert an NSstring to NSerror object type .
For Example
NSString *msg;
msg = "ERROR - Error Domain=Handling Login Response Code=20017 "Invalid user name" UserInfo={NSLocalizedDescription=Invalid user name} errorCode 20017 . "
I want to convert the nsstring[msg] into NSerror Type, because I want to print "Invalid user name" using error.localizedDescription