Skip to content

Commit

Permalink
remove wording
Browse files Browse the repository at this point in the history
  • Loading branch information
reyang committed Aug 26, 2022
1 parent fc72e12 commit 61dfb7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Exporter.InMemory/InMemoryExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public override ExportResult Export(in Batch<T> batch)
{
if (this.disposed)
{
// Since in-memory exporter is designed for testing purpose, having an early error would help developers to catch the bug during early stage of the development.
throw new ObjectDisposedException(this.GetType().Name, "The in-memory exporter is still being invoked after it is disposed. This indicates a wrong use of the OpenTelemetry .NET SDK, where the object lifecycle is not properly managed.");
// Note: In-memory exporter is designed for testing purposes so this error is strategic to surface lifecycle management bugs during development.
throw new ObjectDisposedException(this.GetType().Name, "The in-memory exporter is still being invoked after it has been disposed. This could be the result of invalid lifecycle management of the OpenTelemetry .NET SDK.");
}

return this.onExport(batch);
Expand Down

0 comments on commit 61dfb7e

Please sign in to comment.