Click here to Skip to main content
15,918,742 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have created a solution with two class library projects in it (BL & DAL), which is a working solution to provide a universal 'error logging' platform for future development projects.

In the other solution I am currently working on, I have referenced the BL layer of the Error Logger and called the necessary function and passed through the data. It doesn't ever then appear to be writing anything out to the Error Logger's database.

Does anyone know what I might have missed out please?

What I have tried:

I have installed the Entity Framework package on the Error Logging system and I have initialised the database via the package-manager console as per the usual process.

I have referenced the BL layer of the Error Logger and called the necessary fucntion, which manipulates the data and sends it through to the DAL to be stored.
Posted
Updated 7-Sep-18 3:07am

1 solution

It could be missing configuration. If the code in your referenced dlls relies on any configuration then that configuration needs to be in the config files of the project that is referencing them.

It's rare that a class simply "does nothing" though. Either there is a code path that is simply stopping the code running due to some condition, or an exception is thrown. You can add the projects to the solution you are testing rather than referencing them as dlls and use the debugger to step into your code to get a better idea what is going on.
 
Share this answer
 
Comments
Member 13941890 7-Sep-18 9:53am    
Quote:
It's rare that a class simply "does nothing" though.



It does do nothing if you call the wrong block of code that does not contain the function call you wish to test..! *embarrased*

My apologies, I somehow managed to overlook the fact the code I was calling was nested inside the try/catch block I was looking at, in another try catch block. Stupid mistake on my part and I apologise perfusely for it.

Thank you very much for your help though F-ES Sitecore! I think bringing the projects inside the initial solution may actually help me to solve another issue I've been having so thankfully that advice will still likely come in useful.

Cheers,
AJ

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900