diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-10-04 14:15:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-04 14:15:51 -0400 |
| commit | 97bb82ebcdf8f1391b9d93b5a8d7b1dfc4e88e52 (patch) | |
| tree | f120ba282cbea96d23ed179737984a4610d3b520 /source/compiler-core/slang-diagnostic-sink.cpp | |
| parent | b3dfe383c6d31ff3dbd76dcfb32de8d536382f3e (diff) | |
Removing exceptions from core/compiler-core (#1953)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Refactor Stream. Working on all tests.
* Split out CharEncode.
* Make method names lower camel.
m_prefix in Writer/Reader
* Tidy up around CharEncode interface.
* Small improvements around encode/decode.
* Better use of types.
* Remove readLine from TextReader.
* Remove exceptions from Stream/Text handling.
* Fix some typos.
* Fix tabbing.
* Fix missing override.
* Remove remaining exception throw/catch via using signal mechanism.
* Remove exceptions that are not used anymore.
* Document the Stream interface.
* Remove index for decoding 'get byte' function.
* Fix CharReader -> ByteReader.
Diffstat (limited to 'source/compiler-core/slang-diagnostic-sink.cpp')
| -rw-r--r-- | source/compiler-core/slang-diagnostic-sink.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/compiler-core/slang-diagnostic-sink.cpp b/source/compiler-core/slang-diagnostic-sink.cpp index a6502abc9..c92610e85 100644 --- a/source/compiler-core/slang-diagnostic-sink.cpp +++ b/source/compiler-core/slang-diagnostic-sink.cpp @@ -112,7 +112,7 @@ static void formatDiagnosticMessage(StringBuilder& sb, char const* format, int a if (index >= argCount) { // TODO(tfoley): figure out what a good policy will be for "panic" situations like this - throw InvalidOperationException("too few arguments for diagnostic message"); + SLANG_INVALID_OPERATION("too few arguments for diagnostic message"); } else { @@ -123,7 +123,7 @@ static void formatDiagnosticMessage(StringBuilder& sb, char const* format, int a break; default: - throw InvalidOperationException("invalid diagnostic message format"); + SLANG_INVALID_OPERATION("invalid diagnostic message format"); break; } @@ -512,7 +512,7 @@ void DiagnosticSink::diagnoseImpl(DiagnosticInfo const& info, const UnownedStrin if (info.severity >= Severity::Fatal) { // TODO: figure out a better policy for aborting compilation - throw AbortCompilationException(); + SLANG_ABORT_COMPILATION(""); } } @@ -573,7 +573,7 @@ void DiagnosticSink::diagnoseRaw( if (severity >= Severity::Fatal) { // TODO: figure out a better policy for aborting compilation - throw InvalidOperationException(); + SLANG_ABORT_COMPILATION(""); } } |
