Skip to content

Commit 48c8f0b

Browse files
committed
Added test of trying to convert a non-stack trace string into a stack trace to make sure it doesn't crash
1 parent 30199d6 commit 48c8f0b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

test/stacktraces.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
<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>
1515
<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>
16+
<pre><code class="non-stacktrace">This is not a stack trace</code></pre>
17+
1618

1719
</body>
1820
</html>

test/test.js

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)