How to implement warning / error message reporters library - c++11

I`ve started to work on some project. Their error reporter mechanism doens`t look good
Every time they find an error they prepare string (locally)
Report it via some function
It is very inconvenient - the project is big and looks that the better way to have some module
which has all error message concentrated in some file/data structure. When error occurs just report an error by its id and appropriate string will be emitted. The possible issue is that thre are some errors which are parametrized by some runtime info
Is there some project / design that you can advice for such error reporter.
How to handle parametrized error (number of parameters (and types) vary for different errors - could be one int or 10 strings , etc)
Thanks

Related

How to report custom message in protractor report?

I am using protractor tool with Jasmine framework to write automation scripts.
Got "Wait timed out after 3000ms" error when an element was not appearing in the page. This message looks so generic. So, I want to report a custom message such as: "The element was not showed up for 5 seconds after the page loading. Hence, terminating the execution of the script.".
Can any anyone help me to add a custom message to the reporting?
The browser.wait function allow you to pass an additional parameter for custom log messages, see api documentation
browser.wait(element, 5 * 1000, 'The element was not showed up for 5 seconds after the page loading. Hence, terminating the execution of the script.');

Error during execution of processor 'org.thymeleaf.standard.processor.attr.StandardEachAttrProcessor'

I am creating the API to get list values from DB using spring-boot.I am also using
thymeleaf for the first time. While running the application I get the error,
Error during execution of
processor'org.thymeleaf.standard.processor.attr.StandardEachAttrProcessor'
In console -> java.lang.IllegalArgumentException: Iteration variable cannot be null
Please help me regarding this.

Outlook REST API 500 LegacyPagingToken error

I am using the Microsoft Outlook REST API to synchronize messages in a folder using skipTokens with the Prefer: odata.track-changes header.
After 62 successful rounds of results, I get an error 500 ErrorInternalServerError with the message Unable to cast object of type 'LegacyPagingToken' to type 'Microsoft.Exchange.Services.OData.Model.SkipToken'
I have tried:
Retrying the same query (https://outlook.office.com/api/v2.0/me/MailFolders/Inbox/messages/?%24skipToken=1BWUA9eXs5dN89tPsr_FOvtzINQAA0Cwk5o), which results in the same error
Restarting the sync, which results in the same error at the same point
Adding a new message to the Inbox and restarting the sync, which results in the same error at the same point
Moving the messages from that part of the sync to another folder (in case the messages themselves were causing the problem), which results in the same error at the same point
Has anybody run into this error or have suggestions on what might cause it or workarounds?
It looks like the issue was on my end while parsing the skipToken from the #odata.nextLink response. The token in the original question is invalid - the actual skipToken passed back from the API had -AAAA on the end. After 63 queries, in which the skipToken increments, the Base64 encoded form started using characters the regexp I was using didn't find. Switching from a \w regexp to a proper URL parser solved the problem.

IRS AIR 1095B Manifest Schema -- OriginalReceiptID

I'm attempting to upload AIR test 2C via the IRS UI web portal and received the following submission error: "The manifest file does not match our current schema. In particular, our system has detected a potential issue with the following element(s)" OriginalReceiptID
Here's our manifest file:
top portion of our manifest file
Can anyone find the errors of my ways?
You need to provide the OriginalReceiptId (on the Manifest) only when sending a Replacement record type for a previously "Rejected" Transmission.
The OriginalUniqueSubmissionId (on the 1094-C) should be provided only when sending a Replacement record type for a previously "Rejected" Submission.
Note: You will receive Transmission-level error if you include both the OriginalReceiptId and OriginalUniqueSubmissionId. The type of rejection dictates which one is needed to be used. The Type of Rejection is caused by either the Transmission or Submission, and is defined by the reason for the rejection and the structure of the Error Data File received from the status response.
CorrectedUniqueSubmissionId on the 1094-C is used when sending a
Correction record type for a previously "Accepted" or "Accepted with Errors" 1094-C record.
CorrectedUniqueRecordId on the 1095-C is used when sending a
Correction record type for a previously "Accepted" or "Accepted with Errors" 1095-C record.
I don't think you need original receipt id for the correction files, it is for rejected files. refer to IRS air composition referece guide at https://www.irs.gov/pub/irs-pdf/p5165.pdf

Teamcity email only 10 changes are shown, how to show more changes

The Teamcity notification email after build successful only show 10 changes. I want to know how to config in teamcity to show more changes.
Thanks!
you can create the internal.properties in config folder, and included following properties,
teamcity.notification.template.update.interval - how often the templates are reread by system (integer, in seconds, default 60)
teamcity.notification.includeDebugInfo - include debug information into the message in case of template processing errors (boolean, default false)
teamcity.notification.maxChangesNum - max number of changes to list in e-mail message (integer, default 10)
teamcity.notification.maxCompilationDataSize - max size (in bytes) of compilation error data to include in e-mail message (integer, default 20480)
teamcity.notification.maxFailedTestNum - max number of failed tests to list in e-mail message (integer, default 50)
teamcity.notification.maxFailedTestStacktraces - max number of test stacktraces in e-mail message (integer, default 5)
teamcity.notification.maxFailedTestDataSize - max size (in bytes) of failed test output data to include in a single e-mail message (integer, default 10240)
more details see, https://confluence.jetbrains.com/display/TCD9/Configuring+TeamCity+Server+Startup+Properties
Imho, it seems TC does not clearly support anything away from out of the box defaults. In other words, lots of things are apparently configurable but there is no documentation nor will a query to their board receive a reply. Instead, the solution seems to be to assume that all the template files can be edited pretty much at will to provide the desired results.
This issue is a case in point. One user gave a generic answer to how to find/edit the notification template in general;
http://devnet.jetbrains.net/thread/293800
TeamCity 5.1 Email template :: JetBrains Developer Community
devnet.jetbrains.net/thread/293800Feb 7, 2011 – I'm going to begin use TeamCity for our projects. ... getViewChangesUrl(bean.build)}'>${modNum} change<#plural modNum/> ...
Note that he cites the "modNum" value, which is our problematic item. Its default appears to be 10 per out-of-the-box settings. (I don't think we can see that part.) I was able to easily change it by assigning a new value.
In my file [ServerConfigsPath]\config_notifications\email\common.ftl , I now have;
<!-- was #assign modNum=bean.modificationsNumber/ -->
<#assign modNum=100/>
I hope this helps you or another newbie. I love SO!
//sorry for spacing on the code, I can't see how to get it right...

Resources