mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-24 08:31:32 -04:00
Fixed exceptions in C# SDK when someone disconnects or when a transaction originates from CLI
This commit is contained in:
@@ -712,6 +712,8 @@ pub fn autogen_csharp_globals(items: &[GenItem], namespace: &str) -> Vec<(String
|
||||
);
|
||||
}
|
||||
writeln!(output, "\"<none>\" => null,");
|
||||
writeln!(output, "\"__identity_disconnected__\" => null,");
|
||||
writeln!(output, "\"\" => null,"); //Transaction from CLI command
|
||||
writeln!(
|
||||
output,
|
||||
r#"var reducer => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {{reducer}}")"#
|
||||
|
||||
@@ -738,6 +738,8 @@ namespace SpacetimeDB
|
||||
"repeating_test" => BSATNHelpers.FromProtoBytes<RepeatingTestArgsStruct>(argBytes),
|
||||
"test" => BSATNHelpers.FromProtoBytes<TestArgsStruct>(argBytes),
|
||||
"<none>" => null,
|
||||
"__identity_disconnected__" => null,
|
||||
"" => null,
|
||||
var reducer => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {reducer}")
|
||||
};
|
||||
return new ReducerEvent(dbEvent, args);
|
||||
|
||||
Reference in New Issue
Block a user