/* * Copyright 2002 Perforce Software. All rights reserved. */ /* * ErrorPrivate - list of errors stored in an Error * * Classes defined: * * ErrorPrivate - private part of Error that holds a list of * errors, as well as the pre- and post-formatted * messages and a StrDict of parameters to reformat * the messages. * * Public methods: * * ErrorPrivate::Clear() - prepare for Set() * ErrorPrivate::operator = - copy ErrorPrivate * ErrorPrivate::Set() - add another error message * ErrorPrivate::SetArg() - provide an argument for last error message * ErrorPrivate::AddVar() - add var/value parameter for SetArg() * ErrorPrivate::Dump() - dump structure for debugging */ const int OldErrorMax = 8; const int ErrorMax = 20; // As of Release 2014.1 class ErrorPrivate { public: void operator =( const ErrorPrivate &source ); void Clear() { errorCount = 0; errorDict.Clear(); whichDict = &errorDict; fmtSource = isConst; walk = 0; } /* Setting errors */ void Set( const ErrorId &id ) { if( errorCount == ErrorMax ) --errorCount; /* Save everything */ ids[ errorCount++ ] = id; walk = id.fmt; } void SetArg( const StrPtr &arg ); void Dump(); public: /* Embedded variables and their values */ StrDict *whichDict; // = errorDict unless UnMarshalled BufferDict errorDict; public: // Errors and their values int errorCount; ErrorId ids[ ErrorMax ]; StrBuf fmtbuf; // local storage for UnMarshall // What data ids[].fmt points to -- needed for operator = enum { isConst, isFmtBuf, isShared } fmtSource; const char *walk; // for SetArg's walk } ;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 18760 | rlranft |
Populate -o //guest/perforce_software/p4/... //guest/rlranft/p4/.... |
||
//guest/perforce_software/p4/2014-1/support/errorpvt.h | |||||
#1 | 15902 | Matt Attaway | A second renaming that I will not obliterate as a badge of shame | ||
//guest/perforce_software/p4/2014_1/support/errorpvt.h | |||||
#1 | 15901 | Matt Attaway | Clean up code to fit modern Workshop naming standards | ||
//guest/perforce_software/p4/2014.1/support/errorpvt.h | |||||
#1 | 12188 | Matt Attaway | Move 'main' p4 into a release specific directory in prep for new releases | ||
//guest/perforce_software/p4/support/errorpvt.h | |||||
#1 | 9129 | Matt Attaway | Initial commit of the 2014.1 p4/p4api source code |