projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
๐ Fix NPE when post isnโt loaded
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
page
/
FreenetTemplatePage.kt
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
2dcef51
..
540f36e
100644
(file)
--- a/
src/main/kotlin/net/pterodactylus/sone/web/page/FreenetTemplatePage.kt
+++ b/
src/main/kotlin/net/pterodactylus/sone/web/page/FreenetTemplatePage.kt
@@
-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)
}