In Unity 3d with App42 User API. Why am I getting " The type or namespace name `Exception' could not be found." ?

0 votes

I included this class in one of my scripst:

using com.shephertz.app42.paas.sdk.csharp;    
using com.shephertz.app42.paas.sdk.csharp.user;    

using com.shephertz.app42.paas.sdk.csharp.storage;

public class UserCallBack : App42CallBack

{
    private string result = "";
    
    public void OnSuccess(object user)
    {
        try
        {
            // some code
        }
        catch (App42Exception e)
        {
            result = e.ToString();
        }
    }
    
    public void OnException(Exception e)
    {
        result = e.ToString();
    }   
}

Unity gives me this error:  "The type or namespace name `Exception' could not be found."

asked Jun 23, 2014 in App42 Cloud API-BaaS by huffman (17 points)

1 Answer

+1 vote

Hi huffman,

You are doing well, just import System and your error will diseapper. 

using System;   

happy coding.

answered Jun 23, 2014 by Akshay.Mishra (179 points)
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 support@shephertz.com
...