Skip to content

Do no support throw exception inside method call #18

@weilitao

Description

@weilitao

Hi,

When I throw an exception in Meteor method, like that:
throw new Meteor.Error('abcdef');

in Meteor-Unity side, an exception occurred below:

System.ComponentModel.BaseNumberConverter.ConvertFrom (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, System.Object value)
System.ComponentModel.TypeConverter.ConvertFrom (System.Object o)
JsonFx.Json.TypeCoercionUtility.CoerceType (System.Type targetType, System.Object value) (at Assets/Meteor-Unity/JsonFx/TypeCoercionUtility.cs:383)
JsonFx.Json.JsonReader.ReadString (System.Type expectedType) (at Assets/Meteor-Unity/JsonFx/JsonReader.cs:779)
JsonFx.Json.JsonReader.Read (System.Type expectedType, Boolean typeIsHint) (at Assets/Meteor-Unity/JsonFx/JsonReader.cs:312)
JsonFx.Json.JsonReader.ReadObject (System.Type objectType) (at Assets/Meteor-Unity/JsonFx/JsonReader.cs:477)
JsonFx.Json.JsonReader.Read (System.Type expectedType, Boolean typeIsHint) (at Assets/Meteor-Unity/JsonFx/JsonReader.cs:304)
JsonFx.Json.JsonReader.ReadObject (System.Type objectType) (at Assets/Meteor-Unity/JsonFx/JsonReader.cs:477)
JsonFx.Json.JsonReader.Read (System.Type expectedType, Boolean typeIsHint) (at Assets/Meteor-Unity/JsonFx/JsonReader.cs:304)
JsonFx.Json.JsonReader.Deserialize (Int32 start, System.Type type) (at Assets/Meteor-Unity/JsonFx/JsonReader.cs:275)
JsonFx.Json.JsonReader.Deserialize (System.String value, Int32 start, System.Type type) (at Assets/Meteor-Unity/JsonFx/JsonReader.cs:1005)
JsonFx.Json.JsonReader.Deserialize[ResultMessage] (System.String value) (at Assets/Meteor-Unity/JsonFx/JsonReader.cs:959)
Meteor.Extensions.StringExtensions.Deserialize[ResultMessage] (System.String data) (at Assets/Meteor-Unity/Extensions/StringExtensions.cs:13)
Meteor.Internal.LiveData.HandleOnTextMessageRecv (System.String socketMessage) (at Assets/Meteor-Unity/LiveData/LiveData.cs:389)
Meteor.Internal.LiveData+<Dispatcher>c__Iterator7.MoveNext () (at Assets/Meteor-Unity/LiveData/LiveData.cs:205)

So how to support catch exception during method call?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions