Changeset 94347 in vbox
- Timestamp:
- Mar 24, 2022 8:13:03 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 150653
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/TextScript.h
r93115 r94347 231 231 HRESULT prependToLine(size_t idxLine, const Utf8Str &rStrToPrepend); 232 232 233 /** 234 * Append a new line at the end of the list of line. 235 */ 236 HRESULT appendLine(const Utf8Str &rStrLineToAppend); 233 237 //////////////////New functions////////////////////////////// 234 238 }; … … 236 240 237 241 #endif /* !MAIN_INCLUDED_TextScript_h */ 238 -
trunk/src/VBox/Main/src-all/TextScript.cpp
r93115 r94347 194 194 HRESULT GeneralTextScript::parse() 195 195 { 196 //AssertReturn(!mfDataParsed, mpSetError->setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("parse called more than once")));196 AssertReturn(!mfDataParsed, mpSetError->setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("parse called more than once"))); 197 197 198 198 /* … … 363 363 } 364 364 365 HRESULT GeneralTextScript::appendLine(const Utf8Str &rStrLineToAppend) 366 { 367 AssertReturn(mfDataParsed, mpSetError->setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("appendLine() called before parse()"))); 368 369 try 370 { 371 mScriptContentByLines.append(rStrLineToAppend); 372 } 373 catch (std::bad_alloc &) 374 { 375 return E_OUTOFMEMORY; 376 } 377 return S_OK; 378 379 }
Note:
See TracChangeset
for help on using the changeset viewer.