Improve error reporting from SkSL include files.

Rather than showing a generic `assert(!fErrorCount)` message, this will
put the actual error message in the IDE error log.

Example: http://screen/7hPTTFronJV3ssb

Change-Id: Ic05f354281275d2aca3e006035b01efae29302e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323098
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
John Stiles 2020-10-06 13:37:52 -04:00 committed by Skia Commit-Bot
parent 3c70f0bf12
commit 88f3b68ec2

View File

@ -412,8 +412,8 @@ void Compiler::processIncludeFile(Program::Kind kind, const char* path,
fIRGenerator->fCanInline = true;
if (this->fErrorCount) {
printf("Unexpected errors: %s\n", this->fErrorText.c_str());
SkDEBUGFAILF("%s %s\n", path, this->fErrorText.c_str());
}
SkASSERT(!fErrorCount);
*outSymbolTable = fIRGenerator->fSymbolTable;
#ifdef SK_DEBUG
fSource = nullptr;