Skip to content

Commit

Permalink
Added test of trying to convert a non-stack trace string into a stack…
Browse files Browse the repository at this point in the history
… trace to make sure it doesn't crash
  • Loading branch information
ThomasArdal committed Jan 24, 2025
1 parent 30199d6 commit 48c8f0b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/stacktraces.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

<pre><code class="stacktrace-bug">Azure.Messaging.ServiceBus.ServiceBusException: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue, or was received by a different receiver instance. (MessageLockLost). For troubleshooting information, see https://aka.ms/azsdk/net/servicebus/exceptions/troubleshoot. at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.ThrowLockLostException() at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.DisposeMessageAsync(Guid lockToken, Outcome outcome, TimeSpan timeout) at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.CompleteInternalAsync(Guid lockToken, TimeSpan timeout) at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.&lt;&gt;c.&lt;&lt;CompleteAsync&gt;b__43_0>d.MoveNext() --- End of stack trace from previous location --- at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.&lt;&gt;c__22`1.&lt;&lt;RunOperation&gt;b__22_0&gt;d.MoveNext() --- End of stack trace from previous location --- at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.RunOperation[T1,TResult](Func`4 operation, T1 t1, TransportConnectionScope scope, CancellationToken cancellationToken, Boolean logRetriesAsVerbose) at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.RunOperation[T1](Func`4 operation, T1 t1, TransportConnectionScope scope, CancellationToken cancellationToken) at Azure.Messaging.ServiceBus.Amqp.AmqpReceiver.CompleteAsync(Guid lockToken, CancellationToken cancellationToken) at Azure.Messaging.ServiceBus.ServiceBusReceiver.CompleteMessageAsync(ServiceBusReceivedMessage message, CancellationToken cancellationToken) at Azure.Messaging.ServiceBus.ReceiverManager.ProcessOneMessage(ServiceBusReceivedMessage triggerMessage, CancellationToken cancellationToken)</code></pre>
<pre><code class="stacktrace-ultimate">System.AggregateException: One or more errors occurred. (One of the identified items was in an invalid format.) (Object reference not set to an instance of an object.) ---&gt; System.FormatException: One of the identified items was in an invalid format. at ConsoleApp.A.X() in C:\projects\ConsoleApp\A.cs:line 13 at Program.&lt;&gt;c.&lt;&lt;Main&gt;Program.&lt;&gt;c.&lt;&lt;Main&gt;Program.&lt;&gt;c.&lt;&lt;Main&gt;$&gt;b__0_0()gt;b__0_0gt;b__0_0() in C:\projects\ConsoleApp\Program.cs:line 12 at Program.&lt;&lt;Main&gt;Program.&lt;&lt;Main&gt;Program.&lt;&lt;Main&gt;$&gt;g__CaptureException|0_1(Action action)gt;g__CaptureException|0_1gt;g__CaptureException|0_1(Action action) in C:\projects\ConsoleApp\Program.cs:line 45 --- End of stack trace from previous location --- at Program.&lt;Main&gt;$(String[] args) in C:\projects\ConsoleApp\Program.cs:line 11 --- End of inner exception stack trace --- ---&gt; (Inner Exception #1) System.NullReferenceException: Object reference not set to an instance of an object. at ConsoleApp.B.Y() in C:\projects\ConsoleApp\A.cs:line 21 at Program.&lt;Main&gt;$(String[] args) in C:\projects\ConsoleApp\Program.cs:line 22&lt;---</code></pre>
<pre><code class="non-stacktrace">This is not a stack trace</code></pre>


</body>
</html>
10 changes: 9 additions & 1 deletion test/test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 48c8f0b

Please sign in to comment.