Title: bad error message on incorrect function definition · Issue #1163 · scriptcs/scriptcs · GitHub
Open Graph Title: bad error message on incorrect function definition · Issue #1163 · scriptcs/scriptcs
X Title: bad error message on incorrect function definition · Issue #1163 · scriptcs/scriptcs
Description: I had written a script which contained a small error, and the error messages were very cryptic. I think this should be improved. public class Calc { static Algo1 (double param1, int param2) { Console.WriteLine("Param 1 {0}", param1); } }...
Open Graph Description: I had written a script which contained a small error, and the error messages were very cryptic. I think this should be improved. public class Calc { static Algo1 (double param1, int param2) { Conso...
X Description: I had written a script which contained a small error, and the error messages were very cryptic. I think this should be improved. public class Calc { static Algo1 (double param1, int param2) { Conso...
Opengraph URL: https://github.com/scriptcs/scriptcs/issues/1163
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bad error message on incorrect function definition","articleBody":"I had written a script which contained a small error, and the error messages were very cryptic.\nI think this should be improved.\n\n```\npublic class Calc\n{\n static Algo1 (double param1, int param2)\n {\n Console.WriteLine(\"Param 1 {0}\", param1);\n }\n}\n```\n\nI forgot the \"void\" in front of Algo 1:\n\n```\npublic class Calc\n{\n static void Algo1 (double param1, int param2)\n {\n Console.WriteLine(\"Param 1 {0}\", param1);\n }\n}\n```\n\nThis is the error message that I got\"\n\n```\nERROR: [ScriptCs.Command.ExecuteScriptCommand] Script execution failed. [System.ArgumentOutOfRangeException] Index was out of range. Must be non-negative and less than the size of the collection.\nParameter name: index\n at System.ThrowHelper.ThrowArgumentOutOfRangeException (ExceptionArgument argument, ExceptionResource resource) \u003c0x7ff9ac894c50 + 0x0003a> in \u003cfilename unknown>:0 \n at System.ThrowHelper.ThrowArgumentOutOfRangeException () \u003c0x7ff9ac8949e0 + 0x00012> in \u003cfilename unknown>:0 \n at System.Collections.Generic.List`1[T].get_Item (Int32 index) \u003c0x7ff9ac713ac0 + 0x0001e> in \u003cfilename unknown>:0 \n at Mono.CSharp.Location.get_Name () \u003c0x40345090 + 0x0004a> in \u003cfilename unknown>:0 \n at Mono.CSharp.Location.ToString () \u003c0x40345060 + 0x0000f> in \u003cfilename unknown>:0 \n at Mono.CSharp.ReportPrinter.Print (Mono.CSharp.AbstractMessage msg, System.IO.TextWriter output, Boolean showFullPath) \u003c0x40344d70 + 0x00103> in \u003cfilename unknown>:0 \n at Mono.CSharp.StreamReportPrinter.Print (Mono.CSharp.AbstractMessage msg, Boolean showFullPath) \u003c0x40344d00 + 0x0002f> in \u003cfilename unknown>:0 \n at Mono.CSharp.Report.Error (Int32 code, Location loc, System.String error) \u003c0x40344a10 + 0x000a5> in \u003cfilename unknown>:0 \n at Mono.CSharp.CSharpParser.parse () \u003c0x40212f30 + 0x0032b> in \u003cfilename unknown>:0 \n at Mono.CSharp.Evaluator.ParseString (ParseMode mode, System.String input, System.Boolean& partial_input) \u003c0x401fa760 + 0x00427> in \u003cfilename unknown>:0 \n at Mono.CSharp.Evaluator.Compile (System.String input, Mono.CSharp.CompiledMethod& compiled) \u003c0x401f3f40 + 0x001ff> in \u003cfilename unknown>:0 \n at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) \u003c0x402b7bd0 + 0x00077> in \u003cfilename unknown>:0 \n at ScriptCs.Engine.Mono.MonoScriptEngine.Execute (System.String code, Mono.CSharp.Evaluator session) \u003c0x4022e1b0 + 0x00107> in \u003cfilename unknown>:0 \n```\n\nClearly this error message does not tell anything about the location of the error.\n","author":{"url":"https://github.com/awb99","@type":"Person","name":"awb99"},"datePublished":"2016-05-06T10:07:49Z","url":"https://github.com/scriptcs/scriptcs/issues/1163"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:84dd4355-236a-aab3-66cf-e9bbb67e3319 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E99A:1A3D7F:2F99297:3EDF1C7:6B002297 |
| html-safe-nonce | b3019eac522785bce522c0119c761c092099fd6b1ca3b3f680515ce2017bdc8d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTlBOjFBM0Q3RjoyRjk5Mjk3OjNFREYxQzc6NkIwMDIyOTciLCJ2aXNpdG9yX2lkIjoiNzIwMTI1NzcxNzIyMTA0MDc5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 589cc0dd6ec3862a3aa245378b8905ea04feb71a1a5d0eaf158366838d405b73 |
| hovercard-subject-tag | issue:153420334 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/scriptcs/scriptcs/1163/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2f1b1ff86261889dd77309ab5940a836f8c2716fe2daa93799e2774ae78cf1b0/scriptcs/scriptcs/issues/1163 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2f1b1ff86261889dd77309ab5940a836f8c2716fe2daa93799e2774ae78cf1b0/scriptcs/scriptcs/issues/1163 |
| og:image:alt | I had written a script which contained a small error, and the error messages were very cryptic. I think this should be improved. public class Calc { static Algo1 (double param1, int param2) { Conso... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | awb99 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/scriptcs/scriptcs git https://github.com/scriptcs/scriptcs.git |
| octolytics-dimension-user_id | 3758046 |
| octolytics-dimension-user_login | scriptcs |
| octolytics-dimension-repository_id | 8473240 |
| octolytics-dimension-repository_nwo | scriptcs/scriptcs |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 8473240 |
| octolytics-dimension-repository_network_root_nwo | scriptcs/scriptcs |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width