source: LMDZ6/branches/Amaury_dev/tools/fcm/lib/FCM/CLI/Exception.pm

Last change on this file was 5129, checked in by abarral, 5 months ago

Re-add removed by mistake fcm

File size: 1.9 KB
Line 
1# ------------------------------------------------------------------------------
2# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors.
3#
4# This file is part of FCM, tools for managing and building source code.
5#
6# FCM is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# FCM is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with FCM. If not, see <http://www.gnu.org/licenses/>.
18# ------------------------------------------------------------------------------
19use strict;
20use warnings;
21
22# ------------------------------------------------------------------------------
23package FCM::CLI::Exception;
24use base qw{FCM::Exception};
25
26use constant {
27    APP => 'APP',
28    OPT => 'OPT',
29};
30
31# ------------------------------------------------------------------------------
321;
33__END__
34
35=head1 NAME
36
37FCM::CLI::Exception
38
39=head1 SYNOPSIS
40
41    use FCM::CLI::Exception;
42    FCM::CLI::Exception->throw(FCM::CLI::Exception->APP, \@argv, $e);
43    FCM::CLI::Exception->throw(FCM::CLI::Exception->OPT, \@argv, $e);
44
45=head1 DESCRIPTION
46
47An exception associated with the FCM CLI. It is a sub-class of
48L<FCM::Exception|FCM::Exception>. The $e->get_ctx() method returns an ARRAY
49reference containing the argument list. The $e->get_code() method may return
50either $e->APP (if an unknown application is specified) or $e->OPT (if an
51unknown option is specified, i.e. the option parser returns some errors).
52
53=head1 COPYRIGHT
54
55Copyright (C) 2006-2021 British Crown (Met Office) & Contributors.
56
57=cut
Note: See TracBrowser for help on using the repository browser.