X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpage%2FFreenetTemplatePage.kt;h=540f36e09c7cf2a1f871d188c785cd60be2d578b;hb=bfa49c59a39fddd8bed21bdac98d8bd21e8cb525;hp=d5d8f06a95ce205b4ec3935c6a3ae9391d18ff75;hpb=5201720801a4053f8f324b71fb3e9c36f6cd911e;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/page/FreenetTemplatePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/page/FreenetTemplatePage.kt index d5d8f06..540f36e 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/page/FreenetTemplatePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/page/FreenetTemplatePage.kt @@ -1,5 +1,5 @@ /* - * Sone - FreenetTemplatePage.java - Copyright © 2010–2019 David Roden + * Sone - FreenetTemplatePage.kt - Copyright © 2010–2019 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) }