1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283# 1 "src/lib/eliom_error_pages.server.ml"(* Ocsigen
* Copyright (C) 2005 Vincent Balat
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, with linking exception;
* either version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*)openEliom_libopenEliom_content_coreopenHtml.Fletpage_error_param_typel=lets=matchlwith|[]->[txt"Wrong type for parameter"]|[(n,_)]->[txt"Wrong type for parameter ";em[txtn];txt"."]|(n,_)::ll->txt"Wrong type for parameters "::List.fold_left(fundeb(n,_)->em[txtn]::txt", "::deb)[em[txtn];txt"."]llinhtml(head(title(txt""))[])(body[h1s])letpage_bad_paramafter_actionglpl=lets="Wrong parameters"inhtml(head(title(txts))[])(body(h1[txts]::(ifOcsigen_config.get_debugmode()then[h2[txt"Debugging information:"];(ifafter_actionthenp[txt"An action occurred successfully. But Eliom was unable to find the service for displaying the page."]elsep[txt"Eliom was unable to find a service matching these parameters."]);(matchglwith|[]->p[txt"No GET parameters have been given to services."]|(n,a)::l->p[txt"GET parameters given to services: ";em(txtn::txt"="::txta::List.fold_right(fun(n,a)b->txt"&"::txtn::txt"="::txta::b)l[txt"."])]);(matchplwith|[]->p[txt"No POST parameters have been given to services."]|a::l->p(txt"Names of POST parameters given to services: "::em[txta]::List.fold_right(funnb->txt", "::em[txtn]::b)l[txt"."]))]else[])))letpage_session_expired=lets="Session expired"inhtml(head(title(txts))[])(body[h1[txts]])