🔀 Merge branch 'release/v82'
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / page / FreenetTemplatePage.kt
index d5d8f06..3912f98 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - FreenetTemplatePage.java - Copyright Â© 2010–2019 David Roden
+ * Sone - FreenetTemplatePage.kt - Copyright Â© 2010–2020 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -98,6 +98,9 @@ open class FreenetTemplatePage(
                /* do nothing. */
        }
 
+       fun redirectTo(target: String?): Nothing =
+                       throw RedirectException(target)
+
        class RedirectException(val target: String?) : Exception() {
                override fun toString(): String = format("RedirectException{target='%s'}", target)
        }