static function internalServerError($msg = null, $inner = null, $pos = null) { if ($msg === null) { $msg = "Internal Server Error"; } return tink_core_TypedError::withData(500, $msg, $inner, $pos); }
public function deleteTemporaryFile() { try { @unlink($this->tmpFileName); return tink_core_Outcome::Success(tink_core_Noise::$Noise); } catch (Exception $__hx__e) { $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e; $e = $_ex_; return tink_core_Outcome::Failure(tink_core_TypedError::withData(null, "Error during TmpFileUpload.deleteTmpFile()", $e, _hx_anonymous(array("fileName" => "TmpFileUpload.hx", "lineNumber" => 165, "className" => "ufront.web.upload.TmpFileUpload", "methodName" => "deleteTemporaryFile")))); } }
static function catchExceptions($f, $report = null) { try { return tink_core_Outcome::Success(call_user_func($f)); } catch (Exception $__hx__e) { $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e; if (($e = $_ex_) instanceof tink_core_TypedError) { return tink_core_Outcome::Failure($e); } else { $e1 = $_ex_; return tink_core_Outcome::Failure($report === null ? tink_core_TypedError::withData(null, "Unexpected Error", $e1, _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 97, "className" => "tink.core.TypedError", "methodName" => "catchExceptions"))) : call_user_func_array($report, array($e1))); } } }
function sys_ufront_web_context_HttpRequest_7(&$_g, &$callbackFutures, &$currentContent, &$doData, &$doEndOfPart, &$doPart, &$e, &$errors, &$fileName, &$isFile, &$noParts, &$onData, &$onEndPart, &$onPart, &$partName, &$processCallbackResult, $_5) { if ($errors->length === 0) { $data3 = tink_core_Outcome::Success(tink_core_Noise::$Noise); return tink_core__Future_Future_Impl_::sync($data3); } else { $data4 = tink_core_Outcome::Failure(tink_core_TypedError::withData(null, "Error parsing multipart request data", $errors, _hx_anonymous(array("fileName" => "HttpRequest.hx", "lineNumber" => 174, "className" => "sys.ufront.web.context.HttpRequest", "methodName" => "parseMultipart")))); return tink_core__Future_Future_Impl_::sync($data4); } }
function ufront_core_CallbackTools_2(&$cb, &$pos, &$t, $error, $val1, $val2) { if ($error !== null) { $e = tink_core_TypedError::withData(500, "" . Std::string($error), $pos, _hx_anonymous(array("fileName" => "AsyncTools.hx", "lineNumber" => 266, "className" => "ufront.core.CallbackTools", "methodName" => "asSurprisePair"))); $result = tink_core_Outcome::Failure($e); if ($t->{"list"} === null) { false; } else { $list = $t->{"list"}; $t->{"list"} = null; $t->result = $result; tink_core__Callback_CallbackList_Impl_::invoke($list, $result); tink_core__Callback_CallbackList_Impl_::clear($list); true; } } else { $result1 = tink_core_Outcome::Success(new tink_core_MPair($val1, $val2)); if ($t->{"list"} === null) { false; } else { $list1 = $t->{"list"}; $t->{"list"} = null; $t->result = $result1; tink_core__Callback_CallbackList_Impl_::invoke($list1, $result1); tink_core__Callback_CallbackList_Impl_::clear($list1); true; } } }
function ufront_view_UFViewEngine_4(&$_g, &$ext, &$finalPath, &$path, &$templatingEngine, &$tplStrReady, $tplStr) { try { $tpl4 = $templatingEngine->factory($tplStr); $v = new tink_core_MPair($templatingEngine->type, $tpl4); $_g->cache->set($path, $v); $v; return tink_core_Outcome::Success($tpl4); } catch (Exception $__hx__e) { $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e; $e = $_ex_; return tink_core_Outcome::Failure(tink_core_TypedError::withData(null, "Failed to pass template " . _hx_string_or_null($finalPath) . " using " . _hx_string_or_null($templatingEngine->type), $e, _hx_anonymous(array("fileName" => "UFViewEngine.hx", "lineNumber" => 187, "className" => "ufront.view.UFViewEngine", "methodName" => "getTemplate")))); } }