mirror of
https://github.com/gnh1201/welsonjs.git
synced 2026-04-18 18:18:42 +00:00
Add SPDX header and fix error message
Add SPDX license header and project copyright/URL to JsNative.cs for proper licensing metadata. Update JsonRpc2Dispatcher.cs to improve the exception text to "Unsupported JSON-RPC version: ..." (capitalization and hyphen) for a clearer error message when the jsonrpc version is invalid.
This commit is contained in:
parent
546fe93f23
commit
ef11f06661
|
|
@ -1,4 +1,9 @@
|
||||||
using System;
|
// JsNative.cs
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
// SPDX-FileCopyrightText: 2025 Catswords OSS and WelsonJS Contributors
|
||||||
|
// https://github.com/gnh1201/welsonjs
|
||||||
|
//
|
||||||
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace WelsonJS.Launcher
|
namespace WelsonJS.Launcher
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ namespace WelsonJS.Launcher
|
||||||
{
|
{
|
||||||
string version = ser.ExtractFrom(id, "jsonrpc");
|
string version = ser.ExtractFrom(id, "jsonrpc");
|
||||||
if (!string.Equals(version, "2.0", StringComparison.Ordinal))
|
if (!string.Equals(version, "2.0", StringComparison.Ordinal))
|
||||||
throw new JsonRpc2Exception("Unsupported jsonrpc version: " + version);
|
throw new JsonRpc2Exception("Unsupported JSON-RPC version: " + version);
|
||||||
|
|
||||||
string method = ser.ExtractFrom(id, "method");
|
string method = ser.ExtractFrom(id, "method");
|
||||||
if (string.IsNullOrEmpty(method))
|
if (string.IsNullOrEmpty(method))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user