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:
Namhyeon Go 2026-02-10 11:03:58 +09:00
parent 546fe93f23
commit ef11f06661
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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))