aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/interface')
-rw-r--r--libsolidity/interface/SourceReferenceFormatter.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libsolidity/interface/SourceReferenceFormatter.h b/libsolidity/interface/SourceReferenceFormatter.h
index 7034f4ab..e8676d60 100644
--- a/libsolidity/interface/SourceReferenceFormatter.h
+++ b/libsolidity/interface/SourceReferenceFormatter.h
@@ -23,6 +23,7 @@
#pragma once
#include <ostream>
+#include <sstream>
#include <functional>
#include <libevmasm/SourceLocation.h>
@@ -53,6 +54,16 @@ public:
std::string const& _name,
ScannerFromSourceNameFun const& _scannerFromSourceName
);
+ static std::string formatExceptionInformation(
+ Exception const& _exception,
+ std::string const& _name,
+ ScannerFromSourceNameFun const& _scannerFromSourceName
+ )
+ {
+ std::ostringstream errorOutput;
+ printExceptionInformation(errorOutput, _exception, _name, _scannerFromSourceName);
+ return errorOutput.str();
+ }
private:
/// Prints source name if location is given.
static void printSourceName(