aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-04-13 02:13:16 +0800
committerchriseth <chris@ethereum.org>2018-04-13 02:13:16 +0800
commit966367305ad511900bedfd9af08114a0b1307399 (patch)
tree102ea2f5e50ea41c5e9ee05a2bdef13fb0082790
parentb25598126e57fca73058edd722eef7c681460557 (diff)
downloaddexon-solidity-966367305ad511900bedfd9af08114a0b1307399.tar.gz
dexon-solidity-966367305ad511900bedfd9af08114a0b1307399.tar.zst
dexon-solidity-966367305ad511900bedfd9af08114a0b1307399.zip
Remove dead code and clarify throw.
-rw-r--r--docs/control-structures.rst2
-rw-r--r--test/libsolidity/Assembly.cpp1
2 files changed, 1 insertions, 2 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index 7024a684..879e26f7 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -457,7 +457,7 @@ If used properly, analysis tools can evaluate your contract to identify the cond
There are two other ways to trigger exceptions: The ``revert`` function can be used to flag an error and
revert the current call. It is possible to provide a string message containing details about the error
that will be passed back to the caller.
-The ``throw`` keyword can also be used as an alternative to ``revert()``, but is deprecated.
+The deprecated keyword ``throw`` can also be used as an alternative to ``revert()`` (but only without error message).
.. note::
From version 0.4.13 the ``throw`` keyword is deprecated and will be phased out in the future.
diff --git a/test/libsolidity/Assembly.cpp b/test/libsolidity/Assembly.cpp
index bdb7a107..77ca363a 100644
--- a/test/libsolidity/Assembly.cpp
+++ b/test/libsolidity/Assembly.cpp
@@ -157,7 +157,6 @@ BOOST_AUTO_TEST_CASE(location_test)
}
}
)";
- shared_ptr<string const> n = make_shared<string>("");
AssemblyItems items = compileContract(sourceCode);
vector<SourceLocation> locations =
vector<SourceLocation>(24, SourceLocation(2, 75, make_shared<string>(""))) +