Skip to content

Commit c839dd6

Browse files
committed
added support for Spanish stack traces
1 parent 9c9dfff commit c839dd6

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
A simple and easy JavaScript library for highlighting .NET stack traces
88

99
#### Stacktrace - Language support
10-
[![English](images/flags/US%20-%20United%20States.svg)](#) [![Danish](images/flags/DK%20-%20Denmark.svg)](#) [![German](images/flags/DE%20-%20Germany.svg)](#) [![Russian](images/flags/RU%20-%20Russian%20Federation.svg)](#) [![Chinese](images/flags/CN%20-%20China.svg)](#)
10+
[![English](images/flags/US%20-%20United%20States.svg)](#) [![Danish](images/flags/DK%20-%20Denmark.svg)](#) [![German](images/flags/DE%20-%20Germany.svg)](#) [![Spanish](images/flags/ES%20-%20Spain.svg)](#) [![Russian](images/flags/RU%20-%20Russian%20Federation.svg)](#) [![Chinese](images/flags/CN%20-%20China.svg)](#)
1111

1212
#### Demo
1313
[![netStack.js - demo](images/example.jpg)](https://elmah.io/tools/stack-trace-formatter/)

netstack.js

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
{ name: 'english', at: 'at', in: 'in', line: 'line' },
4949
{ name: 'danish', at: 'ved', in: 'i', line: 'linje' },
5050
{ name: 'german', at: 'bei', in: 'in', line: 'Zeile' },
51+
{ name: 'spanish', at: 'en', in: 'en', line: 'línea' },
5152
{ name: 'russian', at: 'в', in: 'в', line: 'строка' },
5253
{ name: 'chinese', at: '在', in: '位置', line: '行号' }
5354
];
@@ -130,6 +131,7 @@
130131
english: /\s+at .*\)/,
131132
danish: /\s+ved .*\)/,
132133
german: /\s+bei .*\)/,
134+
spanish: /\s+en .*\)/,
133135
russian: /\s+в .*\)/,
134136
chinese: /\s+ .*\)/
135137
};

test/stacktraces.html

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<pre><code class="stacktrace-en-2">Elmah.TestException: This is a test exception that can be safely ignored. at Elmah.ErrorLogPageFactory.FindHandler(String name) in C:\ELMAH\src\Elmah\ErrorLogPageFactory.cs:line 126 at Elmah.ErrorLogPageFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) in C:\ELMAH\src\Elmah\ErrorLogPageFactory.cs:line 66 at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)</code></pre>
66
<pre><code class="stacktrace-dk">System.ApplicationException: Kørselsfejl ---> System.FormatException: Inputstrengen blev ikke formateret korrekt. ved System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type) ved System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info) ved System.Int32.Parse(String s) ved MyNamespace.IntParser.Execute(String s) i C:\apps\MyNamespace\IntParser.cs:linje 13 --- Slutning af stackspor fra tidligere sted, hvor undtagelse blev kastet --- ved Elmah.Io.App.Controllers.AccountController.ChangeEmail(String secret) i x:\agent\_work\94\s\src\Elmah.Io.App\Controllers\AccountController.cs:linje 45 ved System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) --- Slutning af stackspor fra tidligere sted, hvor undtagelse blev kastet --- ved MyNamespace.IntParser.Execute(String s) i C:\apps\MyNamespace\IntParser.cs:linje 17 ved MyNamespace.Program.Main(String[] args) i C:\apps\MyNamespace\Program.cs:linje 13</code></pre>
77
<pre><code class="stacktrace-de">System.ApplicationException: Etwas hier ---> System.FormatException: Die Eingabezeichenfolge wurde nicht richtig formatiert. bei System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type) bei System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info) bei System.Int32.Parse(String s) bei MyNamespace.IntParser.Execute(String s) in C:\apps\MyNamespace\IntParser.cs:Zeile 13 --- Ende des Stack-Trace vom vorherigen Ort, an dem eine Ausnahme ausgelöst wurde --- bei Elmah.Io.App.Controllers.AccountController.ChangeEmail(String secret) in x:\agent\_work\94\s\src\Elmah.Io.App\Controllers\AccountController.cs:Zeile 45 bei System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) --- Ende des Stack-Trace vom vorherigen Ort, an dem eine Ausnahme ausgelöst wurde --- bei MyNamespace.IntParser.Execute(String s) in C:\apps\MyNamespace\IntParser.cs:Zeile 17 bei MyNamespace.Program.Main(String[] args) in C:\apps\MyNamespace\Program.cs:Zeile 13</code></pre>
8+
<pre><code class="stacktrace-es">System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en Grpc.Net.Client.Internal.GrpcCall`2.&lt;GetResponseHeadersCoreAsync&gt;d__72.MoveNext() en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en Grpc.Net.Client.Internal.HttpClientCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request) en Grpc.Core.Interceptors.InterceptingCallInvoker.&lt;BlockingUnaryCall&gt;b__3_0[TRequest,TResponse](TRequest req, ClientInterceptorContext`2 ctx) en Grpc.Core.ClientBase.ClientBaseConfiguration.ClientBaseConfigurationInterceptor.BlockingUnaryCall[TRequest,TResponse](TRequest request, ClientInterceptorContext`2 context, BlockingUnaryCallContinuation`2 continuation) en Grpc.Core.Interceptors.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request) en WinForm_gRPC.Test.TestClient.Communication(MyRequest request, CallOptions options) en C:\Users\2590\source\repos\WinForm_gRPC\WinForm_gRPC\obj\Debug\Protos\TestGrpc.cs:línea 114 en WinForm_gRPC.Test.TestClient.Communication(MyRequest request, Metadata headers, Nullable`1 deadline, CancellationToken cancellationToken) en C:\Users\2590\source\repos\WinForm_gRPC\WinForm_gRPC\obj\Debug\Protos\TestGrpc.cs:línea 109 en WinForm_gRPC.Form1.btnLogin_Click(Object sender, EventArgs e) en C:\Users\2590\source\repos\WinForm_gRPC\WinForm_gRPC\Form1.cs:línea 135</code></pre>
89
<pre><code class="stacktrace-ru">System.ApplicationException: Ошибка в ходе выполнения ---> System.FormatException: Входная строка имела неверный формат. в System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type) в System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info) в System.Int32.Parse(String s) в MyNamespace.IntParser.Execute(String s) в C:\apps\MyNamespace\IntParser.cs:строка 13 --- Конец трассировка стека из предыдущего расположения, где возникло исключение --- в Elmah.Io.App.Controllers.AccountController.ChangeEmail(String secret) в x:\agent\_work\94\s\src\Elmah.Io.App\Controllers\AccountController.cs:строка 45 в System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) --- End of stack trace from previous location where exception was thrown --- в MyNamespace.IntParser.Execute(String s) в C:\apps\MyNamespace\IntParser.cs:строка 17 в MyNamespace.Program.Main(String[] args) в C:\apps\MyNamespace\Program.cs:строка 13</code></pre>
910
<pre><code class="stacktrace-cn">System.Exception: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. 系统找不到指定的文件。 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 ClrCustomVisualizerVSHost.VisualizerTargetInternal.&lt;RequestDataAsync&gt;d__10.MoveNext() --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 Microsoft.VisualStudio.OutOfProcessVisualizers.VisualizerTarget.&lt;RequestDataAsync&gt;d__10.MoveNext()</code></pre>
1011

test/test.js

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)