question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set error naming convention

See original GitHub issue

Until version 5.6.0, it was possible to set the properties “ErrorExchangeNamingConvention” and “ErrorQueueNamingConvention” of conventions.


var conventions = _advancedBus.Container.Resolve<IConventions>();
conventions.ErrorExchangeNamingConvention = info => "any_exchange_name_based_on_info";
conventions.ErrorQueueNamingConvention = info => "any_queue_name_based_on_info";

How can I do this on version 6.2.0? IConventions properties do not allow set values.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Plinercommented, Nov 19, 2020

Ok, but the interface (IConventions) does not!

Are you saying that I explicit have to cast the object returned from DI injection (IConventions) to the concrete type (Conventions)? I believe this is not the better way…

Sure.

x => x.Register(c => new Conventions(c.Resolve<ITypeNameSerializer>())
{
/* set everything you need here */
})
2reactions
sungam3rcommented, Nov 19, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to name exceptions? It's not so obvious…
Naming exceptions are even more complicated because exceptions are not regular classes. In this article, I'll tell you a bit about naming conventions...
Read more >
Exception( Error ) Naming
Exceptions should be classes and hence the class naming convention should be used. Add a suffix "Error" on your exception names, provided the...
Read more >
Convention for naming Ruby exceptions
The Ruby standard library always names the exceptions as such (a noun that is Exception or Error ) - for example.
Read more >
Best Practices To Create Error Codes Pattern For an ...
You first have to isolate the areas where errors might occur, and are user-visible. Then you can document them. Its that simple. Well,...
Read more >
naming-convention.md - typescript-eslint ...
Enforcing naming conventions helps keep the codebase consistent, and reduces overhead when thinking about how to name a variable.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found