From 97bb82ebcdf8f1391b9d93b5a8d7b1dfc4e88e52 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Mon, 4 Oct 2021 14:15:51 -0400 Subject: 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. --- source/core/slang-io.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/core/slang-io.h') diff --git a/source/core/slang-io.h b/source/core/slang-io.h index a077d416b..50ce67784 100644 --- a/source/core/slang-io.h +++ b/source/core/slang-io.h @@ -14,12 +14,12 @@ namespace Slang public: static bool exists(const String& fileName); - static String readAllText(const String& fileName); + static SlangResult readAllText(const String& fileName, String& outString); - static List readAllBytes(const String& fileName); + static SlangResult readAllBytes(const String& fileName, List& out); static SlangResult readAllBytes(const String& fileName, ScopedAllocation& out); - static void writeAllText(const String& fileName, const String& text); + static SlangResult writeAllText(const String& fileName, const String& text); static SlangResult writeAllBytes(const String& fileName, const void* data, size_t size); -- cgit v1.2.3