App42Exception seems to be empty when catch by Unity ?

0 votes

Hi again.

So, with try/catch I was able to catch the app42 exception thrown when the email is empty.

Un fortunatly it seem that the returned object is empty. Is that true ? Is there any way to get errCode & message ?

try {
    userService.CreateUser(user, pwd, email,roleList,helioCallBack);   
} catch (Exception e) {
    App42Exception exception = (App42Exception)e;
    Debug.Log("Empty ? " + exception.GetMessage();
    Debug.Log("Empty ? " + exception.GetAppErrorCode().ToString();

If I print e I get this ; Do I need to manipulate this tring to extract "EmailAddress is Not Valid" ?

com.shephertz.app42.paas.sdk.csharp.App42Exception: EmailAddress is Not Valid

 at com.shephertz.app42.paas.sdk.csharp.util.Util.ThrowExceptionIfEmailNotValid (System.Object obj, System.String name) [0x00000] in <filename unknown>:0 

  at com.shephertz.app42.paas.sdk.csharp.user.UserService.CreateUser (System.String uName, System.String pwd, System.String emailAddress, IList`1 roleList, App42CallBack callBack) [0x00000] in <filename unknown>:0 
asked Apr 17, 2017 in Unity by starcmd (29 points)

1 Answer

+1 vote
Best answer

Hi Starc,


Apologies for the delay in response. The exception "Email Address is not valid" is SDK generated not returned through the server. Due to this, there is no error code and yes, you are right you have to manipulate this message string to extract the message "EmailAddress is Not Valid". 

Let us know if any other help required from our end. 



Himanshu Sharma

answered Apr 19, 2017 by hs00105 (2,005 points)
selected Apr 20, 2017 by starcmd
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on