Sponsored Content
Operating Systems Solaris Reboot problem !!! urgent plse !!!!!!!!!!! Post 95763 by kduffin on Saturday 14th of January 2006 04:54:46 PM
Old 01-14-2006
Ouch - you're right. No syslog, just 'wall'.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help urgent problem

i accedently "deleted" all workspaces I have a black screen and dont know what to do solaris common desktop enviroment (1 Reply)
Discussion started by: ssshakir
1 Replies

2. Solaris

define nvalias's cdrom URGENTLY plse!!!

I need help please ....... I have to urgently setup nvalias 's cdrom ....... following are the output command ...................... {7} ok banner Sun Fire 3800 OpenFirmware version 5.15.2 (08/04/03 10:27) Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved. Use is... (1 Reply)
Discussion started by: tt155
1 Replies

3. Solaris

hme0 problem after reboot

Hi ..... My problem is that when i reboot the system i can't connect to the network because my ethernet ( hme0 ) is down , i must up it by ifconfig command after reboot : # ifconfig -a lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask... (1 Reply)
Discussion started by: tt155
1 Replies

4. Shell Programming and Scripting

UNIX script issues - Plse help guru's

Hi, I have written the following UNIX for HP-UX 11i. The script basically checks for files older then 45mins in 2 repective directories and then sends and email to the administrator about them. Problem with the script is that I can run it from the command line and crontabtab but 80% of the... (2 Replies)
Discussion started by: budrito
2 Replies

5. UNIX for Dummies Questions & Answers

Shutdown and Reboot problem

Hi, i have sco openserver 5.0.6 but have a problem with shutdown or reboot commands. The string I use is "shutdown -g0 -y" but the system just hangs on "The sytem is down" . I used to get a "Safe to turn of" but now nothing. Same with "reboot" the sytem just freezes. Any suggestions? (1 Reply)
Discussion started by: VTechman
1 Replies

6. UNIX for Advanced & Expert Users

problem connecting to oracle 10g after NCR node reboot

Hi All, I am facing a connection problem with Oracle 10g on Solaris 10 when my application (started by /etc/rc3.d at node reboot) tries to establish a session after reboot of the node where my application is running (NCR UNIX (MP RAS)). I find that my application (run as a deamon process)... (1 Reply)
Discussion started by: sowjanya
1 Replies

7. HP-UX

Make_Recovery Question Urgent Plse Respond

I have a make_recovery tape, if I restore the VG00 volume group using this, will my other volume groups still be ok after the restore(I have 7 data volume groups) I used make_recovery -A to create the tape I have a HP9000 HP-UX 11 An internal disk is failing, the other volume groups are on... (3 Replies)
Discussion started by: rees_a
3 Replies

8. Linux

Reboot investigation problem

I have a linux server,in this i receive alarm as server has rebooted. When i check uptime of the server it says that the server has rebooted but when i check output of who -b it says that the server rebooted very long back Can some one help what is the issue here. (3 Replies)
Discussion started by: tiwsaj
3 Replies

9. Red Hat

[ URGENT] - HDD visible to OS without reboot

Hi, I have added 30 GB Vmware Scsci disk in RHEL # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.3 (Tikanga) I want to make this 30 GB visible to OS without reboot. Pls help (1 Reply)
Discussion started by: saurabh84g
1 Replies

10. Solaris

solaris link aggregation problem , once i reboot it is not showing, not able to ping the default gat

Hi All, I am trying to aggregate the NIC's,(igb2 and igb3) (igb0 is used by the physical system and igb1 is used by primary-vsw0) to create the domains on that for faster data transfer, I followed the process for creating the aggregation, dladm create-aggr -d igb2 -d igb3 1 after creating the... (2 Replies)
Discussion started by: buildscm
2 Replies
Ouch(3pm)						User Contributed Perl Documentation						 Ouch(3pm)

NAME
Ouch - Exceptions that don't hurt. VERSION
version 0.0401 SYNOPSIS
use Ouch; eval { ouch(404, 'File not found.'); }; if (kiss 404) { check_elsewhere(); } say $@; # These two lines do the say $@->scalar; # same thing. DESCRIPTION
Ouch provides a class for exception handling that doesn't require a lot of boilerplate, nor any up front definition. If Exception::Class is working for you, great! But if you want something that is faster, easier to use, requires less typing, and has no prereqs, but still gives you much of that same functionality, then Ouch is for you. Why another exception handling module? It really comes down to Carp isn't enough for me, and Exception::Class does what I want but makes me type way too much. Also, I tend to work on a lot of protocol-based systems that use error codes (HTTP, FTP, SMTP, JSON-RPC) rather than error classes, so that feels more natural to me. Consider the difference between these: Ouch use Ouch; ouch 404, 'File not found.', 'file'; Exception::Class use Exception::Class ( 'FileNotFound' => { fields => [ 'code', 'field' ], }, ); FileNotFound->throw( error => 'File not found.', code => 404, field => 'file' ); And if you want to catch the exception you're looking at: Ouch if (kiss 404) { # do something } Exception::Class my $e; if ($e = Exception::Class->caught('FileNotFound')) { # do something } Those differences may not seem like a lot, but over any substantial program with lots of exceptions it can become a big deal. Usage Most of the time, all you need to do is: ouch $code, $message, $data; ouch -32700, 'Parse error.', $request; # JSON-RPC 2.0 error ouch 441, 'You need to specify an email address.', 'email'; # form processing error ouch 'missing_param', 'You need to specify an email address.', 'email'; You can also go long form if you prefer: die Ouch->new($code, $message, $data); Functional Interface ouch Some nice sugar instead of using the object oriented interface. ouch 2121, 'Did not do the big thing.'; code An error code. An integer or string representing error type. Try to stick to codes used in whatever domain you happen to be working in. HTTP Status codes. JSON-RPC error codes, etc. message A human readable error message. data Optional. Anything you want to attach to the exception to help a developer catching it decide what to do. For example, if you're doing form processing, you might want this to be the name of the field that caused the exception. WARNING: Do not include objects or code refs in your data. This should only be stuff that is easily serializable like scalars, array refs, and hash refs. kiss Some nice sugar to trap an Ouch. if (kiss $code) { # make it go } code The code you're looking for. exception Optional. If you like you can pass the exception into "kiss". If not, it will just use whatever is in $@. You might want to do this if you've saved the exception before running another "eval", for example. hug Some nice sugar to trap any exception. if (hug) { # make it stop } exception Optional. If you like you can pass the exception into "hug". If not, it will just use whatever is in $@. bleep A little sugar to make exceptions human friendly. Returns a clean error message from any exception, including an Ouch. File not found. Rather than: File not found. at /Some/File.pm line 63. exception Optional. If you like you can pass the exception into "bleep". If not, it will just use whatever is in $@. Calls "bleep", and then exits with error code exception Optional. You can pass an exception into "barf" which then gets passed to "bleep" otherwise it will use whatever's in $@ Object-Oriented Interface new Constructor for the object-oriented interface. Takes the same parameters as "ouch". Ouch->new($code, $message, $data); scalar Returns the scalar form of the error message: Crap! at /Some/File.pm line 43. Just as if you had done: die 'Crap!'; Rather than: ouch $code, 'Crap!'; trace Call this if you want the full stack trace that lead up to the ouch. hashref Returns a formatted hash reference of the exception, which can be useful for handing off to a serializer like JSON. { code => $code, message => $message, data => $data, } code Returns the "code" passed into the constructor. message Returns the "messsage" passed into the constructor. data Returns the "data" passed into the constructor. Traditional Interface Some people just can't bring themselves to use the sugary cuteness of Ouch. For them there is the ":traditional" interface. Here's how it works: use Ouch qw(:traditional); my $e = try { throw 404, 'File not found.'; }; if ( catch 404, $e ) { # do the big thing } elsif ( catch_all $e ) { # make it stop } else { # make it go } NOTE: "try" also populates $@, and "catch" and "catch_all" will also use $@ if you don't specify an exception. try Returns an exception. Is basically just a nice wrapper around "eval". block Try accepts a code ref, anonymous subroutine, or a block. NOTE: You need a semi-colon at the end of a "try" block. throw Works exactly like "ouch". See "ouch" for details. catch Works exactly like "kiss". See "kiss" for details. catch_all Works exactly like "hug". See "hug" for details. Try::Tiny Many Ouch users, like to use Ouch with Try::Tiny, and some of them are sticks in the mud who can't bring themselves to "ouch" and "kiss", and don't like that ":traditional" walks all over "try" and "catch" For them, there is the ":trytiny" interface. Here's how it works: use Try::Tiny; use Ouch qw(:trytiny); try { throw(404, 'File not found!'; } catch { if (caught($_)) { # do something } else { throw($_); # rethrow } }; SUPPORT
Repository <http://github.com/rizen/Ouch> Bug Reports <http://github.com/rizen/Ouch/issues> SEE ALSO
If you're looking for something lighter, check out Carp that ships with Perl. Or if you're looking for something heavier check out Exception::Class. AUTHOR
JT Smith <jt_at_plainblack_dot_com> LEGAL
Ouch is Copyright 2011 Plain Black Corporation (<http://www.plainblack.com>) and is licensed under the same terms as Perl itself. perl v5.12.3 2011-04-30 Ouch(3pm)
All times are GMT -4. The time now is 09:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy