added throwing exception
This commit is contained in:
parent
5ffb3af991
commit
32a4dd5157
|
@ -90,8 +90,10 @@ function get_version_file_lifetime()
|
||||||
{
|
{
|
||||||
global $GAME_ROOT;
|
global $GAME_ROOT;
|
||||||
|
|
||||||
exec("git log --follow --format=%ad --date=format:'%Y-%m-%d %H:%M:%S' " . $GAME_ROOT . "/VERSION" , $creating_timestamp);
|
exec("git log --follow --format=%ad --date=format:'%Y-%m-%d %H:%M:%S' " . $GAME_ROOT . "/VERSION" , $out, $ret);
|
||||||
$minutes = (time() - strtotime($creating_timestamp[0])) / 60;
|
if($ret != 0)
|
||||||
|
throw new Exception("git error");
|
||||||
|
$minutes = (time() - strtotime($out[0])) / 60;
|
||||||
|
|
||||||
return ceil($minutes);
|
return ceil($minutes);
|
||||||
}
|
}
|
Loading…
Reference in New Issue