source: pro-violet-viettel/sourcecode/api.violet.vn/www/lib/common/sfEntryException.class.php

Last change on this file was 289, checked in by dungnv, 11 years ago
File size: 852 bytes
Line 
1<?php
2  class sfEntryException extends sfException {
3    const NOT_FOUND = 1000;
4    const ERASED = 1001;
5    const CATEGORY_NOT_FOUND = 1002;
6    const LINK_DUPLICATE = 1003;
7
8    public $errorNum;
9    public function __construct($errorNum) {
10      $this->errorNum = $errorNum;
11      sfException::__construct($this->getEntryMessage(), $errorNum);
12    }
13
14    public function getEntryMessage() {
15      switch ($this->errorNum) {
16        case self::NOT_FOUND:
17          return 'Tài liệu khÃŽng tồn tại';
18        case self::ERASED:
19          return 'Tài liệu đã bị xóa';
20        case self::CATEGORY_NOT_FOUND:
21          return 'Chưa lá»±a chọn thư mục đưa tài liệu lên';
22        case self::LINK_DUPLICATE:
23          return 'Tài liệu này đã được đưa vào một mục khác trong cùng trang riêng';
24      }
25    }
26  }
Note: See TracBrowser for help on using the repository browser.