NCBI C++ ToolKit
|
These functions provide access to Blast_Message objects, used by the BLAST code as a wrapper for error and warning messages. More...
Go to the source code of this file.
Go to the SVN repository for this file.
Functions | |
SMessageOrigin * | SMessageOriginNew (const char *filename, unsigned int lineno) |
Allocate a new SMessageOrigin structure. More... | |
SMessageOrigin * | SMessageOriginFree (SMessageOrigin *msgo) |
Deallocate a SMessageOrigin structure. More... | |
Blast_Message * | Blast_MessageFree (Blast_Message *blast_msg) |
Deallocates message memory. More... | |
Int2 | Blast_MessageWrite (Blast_Message **blast_msg, EBlastSeverity severity, int context, const char *message) |
Writes a message to a structure. More... | |
Int2 | Blast_MessagePost (Blast_Message *blast_msg) |
Print a message with ErrPostEx. More... | |
void | Blast_Perror (Blast_Message **msg, Int2 error_code, int context) |
Analogous to perror. More... | |
void | Blast_PerrorEx (Blast_Message **msg, Int2 error_code, const char *file_name, int lineno, int context) |
Extended version of Blast_Perror which includes parameters for the file name and line number where the error/warning occurred. More... | |
Variables | |
const int | kBlastMessageNoContext = -1 |
Declared in blast_message.h as extern const. More... | |
const char * | kBlastErrMsg_CantCalculateUngappedKAParams |
These functions provide access to Blast_Message objects, used by the BLAST code as a wrapper for error and warning messages.
Definition in file blast_message.c.
Blast_Message* Blast_MessageFree | ( | Blast_Message * | blast_msg | ) |
Deallocates message memory.
blast_msg | structure to be deallocated [in] |
Definition at line 80 of file blast_message.c.
References Blast_Message::message, Blast_Message::next, next(), NULL, Blast_Message::origin, sfree, and SMessageOriginFree().
Referenced by Blast_PerrorEx(), BlastErrorCode2String(), BOOST_AUTO_TEST_CASE(), s_BlastMessageToException(), s_Validate(), TestFixture::SetUpLookupTable(), LinkHspTestFixture::setupScoreBlk(), CBlastExtendTestFixture::setupStructures(), CPssmEngine::x_InitializeScoreBlock(), and CTracebackTestFixture::~CTracebackTestFixture().
Int2 Blast_MessagePost | ( | Blast_Message * | blast_msg | ) |
Print a message with ErrPostEx.
blast_msg | message to be printed [in] |
Definition at line 136 of file blast_message.c.
References Blast_Message::message, and NULL.
Int2 Blast_MessageWrite | ( | Blast_Message ** | blast_msg, |
EBlastSeverity | severity, | ||
int | context, | ||
const char * | message | ||
) |
Writes a message to a structure.
The Blast_Message* is allocated.
blast_msg | structure to be filled in [in] |
severity | severity code [in] |
context | query context to which this error applies [in] |
message | User message to be saved [in] |
Definition at line 102 of file blast_message.c.
References calloc(), Blast_Message::context, context, Blast_Message::message, Blast_Message::next, NULL, Blast_Message::severity, and strdup.
Referenced by Blast_GumbelBlkCalc(), Blast_KarlinBlkGappedCalc(), Blast_KarlinBlkNuclGappedCalc(), Blast_ScoreBlkKbpUngappedCalc(), Blast_SetPHIPatternInfo(), BLAST_ValidateOptions(), BlastExtensionOptionsValidate(), BlastFilteringOptionsFromString(), BlastHitSavingOptionsValidate(), BlastInitialWordOptionsValidate(), BlastKarlinReportAllowedValues(), BlastScoringOptionsValidate(), BlastSetUp_GetFilteringLocations(), LookupTableOptionsValidate(), PSIBlastOptionsValidate(), s_BlastExtensionScoringOptionsValidate(), s_DiscWordOptionsValidate(), s_GetEffectiveSearchSpaceForContext(), s_GetNuclValuesArray(), s_PHIScoreBlkFill(), SBlastFilterOptionsValidate(), and SPHIPatternSearchBlkNew().
void Blast_Perror | ( | Blast_Message ** | msg, |
Int2 | error_code, | ||
int | context | ||
) |
Analogous to perror.
msg | object to be appended to or created [in|out] |
error_code | error code returned from BLAST function [in] |
context | context number so that query or frame can be found [in] |
Definition at line 147 of file blast_message.c.
References Blast_PerrorEx(), context, msg(), and NULL.
void Blast_PerrorEx | ( | Blast_Message ** | msg, |
Int2 | error_code, | ||
const char * | file_name, | ||
int | lineno, | ||
int | context | ||
) |
Extended version of Blast_Perror which includes parameters for the file name and line number where the error/warning occurred.
This function should be invoked via the Blast_PerrorWithLocation macro.
msg | object to be appended to or created [in|out] |
error_code | one of the error codes defined below [in] |
file_name | name of the file where the error ocurred [in] |
lineno | line number where the error ocurred in the file above [in] |
context | context number so that query or frame can be found [in] |
Definition at line 154 of file blast_message.c.
References ASSERT, Blast_MessageFree(), BLASTERR_DB_MEMORY_MAP, BLASTERR_DB_OPEN_FILES, BLASTERR_IDEALSTATPARAMCALC, BLASTERR_INTERRUPTED, BLASTERR_INVALIDPARAM, BLASTERR_INVALIDQUERIES, BLASTERR_MEMORY, BLASTERR_NOVALIDKARLINALTSCHUL, BLASTERR_REDOALIGNMENTCORE_NOTSUPPORTED, BLASTERR_SEQSRC, BLASTERR_SUBJECT_LENGTH_INVALID, buf, calloc(), Blast_Message::context, context, eBlastSevError, eBlastSevFatal, eBlastSevInfo, file_name, kBlastErrMsg_CantCalculateUngappedKAParams, lineno, Blast_Message::message, msg(), Blast_Message::next, Blast_Message::origin, Blast_Message::severity, SMessageOriginNew(), and strdup.
Referenced by Blast_Perror().
SMessageOrigin* SMessageOriginFree | ( | SMessageOrigin * | msgo | ) |
Deallocate a SMessageOrigin structure.
msgo | structure to deallocate [in] |
Definition at line 70 of file blast_message.c.
References SMessageOrigin::filename, NULL, and sfree.
Referenced by Blast_MessageFree().
SMessageOrigin* SMessageOriginNew | ( | const char * | filename, |
unsigned int | lineno | ||
) |
Allocate a new SMessageOrigin structure.
filename | name of the file [in] |
lineno | line number in the file above [in] |
Definition at line 48 of file blast_message.c.
References calloc(), SMessageOrigin::filename, SMessageOrigin::lineno, lineno, NULL, and strdup.
Referenced by Blast_PerrorEx().
const char* kBlastErrMsg_CantCalculateUngappedKAParams |
Definition at line 37 of file blast_message.c.
Referenced by Blast_PerrorEx(), Blast_ScoreBlkKbpUngappedCalc(), BlastSetupPreliminarySearchEx(), BOOST_AUTO_TEST_CASE(), and CBlastPrelimSearch::Run().
Declared in blast_message.h as extern const.
Definition at line 36 of file blast_message.c.
Referenced by TSearchMessages::AddMessageAllQueries(), Blast_GumbelBlkCalc(), Blast_KarlinBlkGappedCalc(), Blast_KarlinBlkNuclGappedCalc(), BLAST_MainSetUp(), Blast_Message2TSearchMessages(), Blast_ScoreBlkKbpUngappedCalc(), Blast_SetPHIPatternInfo(), BLAST_ValidateOptions(), BlastErrorCode2String(), BlastExtensionOptionsValidate(), BlastFilteringOptionsFromString(), BlastHitSavingOptionsValidate(), BlastInitialWordOptionsValidate(), BlastKarlinReportAllowedValues(), BlastScoringOptionsValidate(), BlastSetup_ScoreBlkInit(), CRemoteBlast::GetResultSet(), LookupTableOptionsValidate(), PSIBlastOptionsValidate(), CBlastPrelimSearch::Run(), s_BlastExtensionScoringOptionsValidate(), s_DiscWordOptionsValidate(), s_GetNuclValuesArray(), s_PHIScoreBlkFill(), SBlastFilterOptionsValidate(), and SPHIPatternSearchBlkNew().