Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

errstr(2) [plan9 man page]

ERRSTR(2)							System Calls Manual							 ERRSTR(2)

NAME
errstr, werrstr - description of last system call error SYNOPSIS
#include <u.h> #include <libc.h> int errstr(char *err) void werrstr(char *fmt, ...) DESCRIPTION
When a system call fails it returns -1 and records a string describing the error in a per-process buffer. Errstr swaps the contents of that buffer with the contents of the array err. Err should contain at least ERRLEN characters (defined in <libc.h>). Usually errstr will be called with an empty string, but the exchange property provides a mechanism for libraries to set the return value for the next call to errstr. If no system call has generated an error since the last call to errstr with an empty string, the result is an empty string. The verb r in print(2) calls errstr and outputs the error string. Werrstr takes a print style format as its argument and uses it to format a string to pass to errstr. The string returned from errstr is discarded. SOURCE
/sys/src/libc/9syscall /sys/src/libc/9sys/werrstr.c DIAGNOSTICS
Errstr always returns 0. SEE ALSO
intro(2), perror(2) ERRSTR(2)

Check Out this Related Man Page

Razor2::Errorhandler(3pm)				User Contributed Perl Documentation				 Razor2::Errorhandler(3pm)

NAME
Razor::Errorhandler - Error handling mechanism for Razor. SYNOPSIS
package Foo; use Razor::Errorhandler; @ISA = qw(Razor::Errorhandler); sub alive { .. .. return $self->error ("Awake, awake! Ring the alarum bell. Murther and treason!", $dagger) if $self->murdered($king); } package main; use Foo; my $foo = new Foo; $foo->alive($king) or print $foo->errstr(); # prints "Awake, awake! ... " DESCRIPTION
Razor::Errorhandler encapsulates the error handling mechanism used by the modules in Razor bundle. Razor::Errorhandler doesn't have a constructor and is meant to be inherited. The derived modules use its two methods, error() and errstr(), to communicate error messages to the caller. When a method of the derived module fails, it calls $self->error() and returns to the caller. The error message passed to error() is made available to the caller through the errstr() accessor. error() also accepts a list of sensitive data that it wipes out (undef'es) before returning. The caller should never call errstr() to check for errors. errstr() should be called only when a method indicates (usually through an undef return value) that an error has occured. This is because errstr() is never overwritten and will always contain a value after the occurance of first error. METHODS
error($mesage, ($wipeme, $wipemetoo)) The first argument to error() is $message which is placed in $self->{errstr} and the remaining arguments are interpretted as variables containing sensitive data that are wiped out from the memory. error() always returns undef. errstr() errstr() is an accessor method for $self->{errstr}. AUTHOR
Vipul Ved Prakash, <mail@vipul.net> SEE ALSO
Razor::Client(3) perl v5.14.2 2005-08-03 Razor2::Errorhandler(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. Programming

Help with mySQL database by perl script

Hello; I was trying to set up a mysql database using following script, but never went through. The code seems fine without any syntax error as I tested it: perl -c Brapa0101-db.pl Brapa0101-db.pl syntax OKHowever, whenever I run it, an error message was tossed out: DBD::mysql::st execute... (7 Replies)
Discussion started by: yifangt
7 Replies

2. Shell Programming and Scripting

REGEX for a Full_PATH/Command --with-options

Hello All, I'm trying to match some user input. The User input will be a FULL Path, a Command/Script Name, and any options they choose... I was able to get this to Match somewhat but I want to be able to print an Error if, for example, the user enters a trailing "/" after the Command_name... (9 Replies)
Discussion started by: mrm5102
9 Replies

3. Solaris

Solaris 10 Sendemail with Attachment

Hello I need your kind help for configuring email on Solaris 10 so I can send reports from the system to my management and my colleagues. I have the IP address of the email server of my company and the port 2525. I went through many documents online with no luck. Can any one help me... (4 Replies)
Discussion started by: samer.odeh
4 Replies

4. Shell Programming and Scripting

Execute immediate in perl script

hi All, i have to modify a shell script written in Perl. i have to use execute immediate within this. i have to create a temporary table but it should have name like ar_data_$mmyyyy , how can i achieve this? any help on this would be highly appriciated. (6 Replies)
Discussion started by: lovelysethii
6 Replies

5. Shell Programming and Scripting

CGI Perl : while loop in CGI perl

Hi Team, I am trying to connect to database(succeeded ) and print the records on the browser using while loop. But the elements of array are not displayed instead while loop is displayed directly. Instead of the below I can embed html statements in print but I am looking for the below style as I... (1 Reply)
Discussion started by: scriptscript
1 Replies

6. Shell Programming and Scripting

Perl script database date convertion

Need assistance Below script get the output correctly I want to convert the date format .Below is the output . Any idea ? #!/usr/bin/perl -w use DBI; # Get a database handle by connecting to the database my $db = DBI->connect(... (3 Replies)
Discussion started by: ajayram_arya
3 Replies

7. Solaris

Oracle DB install failure

Hi all, I'm quite new to Solaris and I've been searching around everywhere to try and find the root of my Oracle DB install problem. It quits immediately when it runs isainfo when it gets a return of 3md64. To me this looks like there is a typo where ever isainfo pulls it's info from, but I... (13 Replies)
Discussion started by: asilv
13 Replies

8. Shell Programming and Scripting

Check data in mysql

Hi, I just would like to write a perl script , this perl script do the following . Check the parameter $data in a mysql database ( with user ID and password ) , if the $data is exist then return true , if not then return false , would advise how to write this script ? thanks ---------- Post... (1 Reply)
Discussion started by: ust3
1 Replies

9. UNIX for Dummies Questions & Answers

Finding SSL Cert Info

How do I find out the SSL cert info on the local server? How do I know if an ssl cert is installed on local server? How it was issued to? Who was the issuer? What's the expiration date? Any other relevant information? (1 Reply)
Discussion started by: scj2012
1 Replies

10. Shell Programming and Scripting

PERL: Calling a sub routine from another module - help!!!

Hi, I am an occasional PERL user. I am trying to call a sub routine (passing parameters) in perl module from a driver .pl file. I have been "tinkering" for a while now and have confused myself. Could someone please look at the code below and spot where I am going wrong. testPerl.pl ... (0 Replies)
Discussion started by: chris01010
0 Replies

11. Shell Programming and Scripting

PERL: DBI - Is it possible to get a "nicer" formatted return?

Hi, I am currently writing a perl module that will be passed queries from other scripts and use DBI to execute them on an Oracle Database. The problem I have is when it comes to the return. I am currently getting this from my code: FIELDA FIELDB FIELDC ... (6 Replies)
Discussion started by: chris01010
6 Replies

12. Shell Programming and Scripting

DBD::JDBC::db prepare failed: java.io.IOException: Unrecognized BER object identifier:

Hello, I am trying to write a perl script to access Solid LDAP database using JDBC. The script connects to the database but gives below error while running sql prepare command : try.pl connecting preparing................ DBD::JDBC::db prepare failed: java.io.IOException:... (0 Replies)
Discussion started by: PerlMonkey
0 Replies

13. Shell Programming and Scripting

Perl inserting random negative integer

Hi All, i have problem here whenever i run this perl script that is pasted here, it inserts a negative number in place of PO_nbr . What the script does is reads a pipe delimited file and then using some values on the file it will query db to get few other values and then it inserts the... (4 Replies)
Discussion started by: selvankj
4 Replies

14. Shell Programming and Scripting

Date-Manipulation-1

Hallo Team I can perform the task manually but i would like to automate this process. ok here goes. I have a perl script which runs every Wednesday every week and the name of the script is check_19.pl This is how the script looks like : #!/usr/bin/perl -w #use strict; use DBI; #... (1 Reply)
Discussion started by: kekanap
1 Replies

15. Shell Programming and Scripting

IP list specific port checker script

Hello again people, I currently searching for a code/script that will allow it to check if a specific port is open, lets say 123. Found a public script on a ftp but I dont know how and what to modify in it to suit my needs. (I think this is a evil code and I want to use it as an example). ... (3 Replies)
Discussion started by: galford
3 Replies