New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Exception.pm in vendors/FCM-2017.10.0/lib/FCM/CLI – NEMO

source: vendors/FCM-2017.10.0/lib/FCM/CLI/Exception.pm @ 12899

Last change on this file since 12899 was 10672, checked in by nicolasmartin, 5 years ago

Reimport latest FCM release

File size: 1.8 KB
Line 
1# ------------------------------------------------------------------------------
2# (C) British Crown Copyright 2006-17 Met Office.
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
55(C) Crown copyright Met Office. All rights reserved.
56
57=cut
Note: See TracBrowser for help on using the repository browser.