[gjs: 15/16] Gio: Correct inaccurate error message



commit 5754195e0edd09a40ba1dfeb2f882a9424622a84
Author: Philip Chimento <philip endlessm com>
Date:   Wed Oct 10 16:08:18 2018 -0700

    Gio: Correct inaccurate error message
    
    The number of arguments includes the extra parameters, and the extra
    parameters include a Gio.Cancellable object.

 modules/overrides/Gio.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/modules/overrides/Gio.js b/modules/overrides/Gio.js
index 7e0a9ce2..c20ea475 100644
--- a/modules/overrides/Gio.js
+++ b/modules/overrides/Gio.js
@@ -43,9 +43,9 @@ function _proxyInvoker(methodName, sync, inSignature, arg_array) {
         throw new Error("Not enough arguments passed for method: " + methodName +
                        ". Expected " + minNumberArgs + ", got " + arg_array.length);
     } else if (arg_array.length > maxNumberArgs) {
-        throw new Error("Too many arguments passed for method: " + methodName +
-                       ". Maximum is " + maxNumberArgs +
-                        " + one callback and/or flags");
+        throw new Error(`Too many arguments passed for method ${methodName}. ` +
+            `Maximum is ${maxNumberArgs} including one callback, ` +
+            'cancellable, and/or flags');
     }
 
     while (arg_array.length > signatureLength) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]