i'm developing wcf service c# , .net framework 4.0.
i have following code:
public long createuser(string username) { try { if ((username == null) || (username.equals(string.empty))) throw new argumentnullexception(); ... } catch (exception ex) { resultcode = 3; throw ex; } ... }
when username == string.empty debugger stops , dialog said:
argumentnullexception unhandled user code.
how can fix that?
update
want notify client there error in server side.
you need handle exception when using createuser method:
try { myclass.createuser (user); } catch (argumentnullexception ex) { }
Comments
Post a Comment