Skip to content
Permalink
Browse files

Added an error message on failing render

  • Loading branch information...
Emyrk committed Jun 20, 2017
1 parent 5a64cdd commit 9524748c71ebae51e95890d9dd348c4552c08822
Showing with 29 additions and 5 deletions.
  1. +1 −0 display.go
  2. 0 make.sh
  3. +13 −5 web/min-file.sh
  4. +15 −0 web/templates/error.html
@@ -162,6 +162,7 @@ func pageHandler(w http.ResponseWriter, r *http.Request) {

if err != nil {
fmt.Printf("An error has occurred")
HandleError(w, r, err)
}
}

0 make.sh 100644 → 100755
No changes.
@@ -26,12 +26,20 @@ if [ "$1" == "closure" ] # Closure compile by google
java -jar closure/compiler.jar --js_output_file=min-statics/js/ajax.js statics/js/ajax.js
echo " Minifying app.js..."
java -jar closure/compiler.jar --js_output_file=min-statics/js/app.js statics/js/app.js
elif [ "$1" == "none" ]
then
echo "No minify"
else
minify -r -o min-statics/js statics/js/
fi

echo "Minfying css..."
echo " Minifying statics/css/app.css..."
minify -o min-statics/css/app.css statics/css/app.css
echo " Minifying statics/css/other.css..."
minify -o min-statics/css/other.css statics/css/other.css
if [ "$1" == "none" ]
then
echo "Not minify css"
else
echo "Minfying css..."
echo " Minifying statics/css/app.css..."
minify -o min-statics/css/app.css statics/css/app.css
echo " Minifying statics/css/other.css..."
minify -o min-statics/css/other.css statics/css/other.css
fi
@@ -0,0 +1,15 @@
{{define "customError"}}

{{$pageTitle := "Error"}}
{{$mainClass := "error"}}
{{$theme := .Settings.Theme}}
{{$activeNav := 1}}
{{$info := mkArray $pageTitle $theme $activeNav $mainClass .Settings}}
{{template "templateTop" $info}}
<div id="guts">
An error has occured. If this continues to happen, please reach out to us with the following message:
<br />
<pre>{{.Content}}</pre>
</div>
{{template "templateBottom" ""}}
{{end}}

0 comments on commit 9524748

Please sign in to comment.
You can’t perform that action at this time.