die Questions

5

Solved

I'm trying to manipulate a PHP script so that it redirects to a particular URL instead of giving me a MySQL error. So I went from this... $qs = mysql_query("SELECT url FROM $table WHERE `id` = $gi...
Ilyse asked 4/6, 2011 at 21:14

5

Solved

I know I can die but that prints out the script name and line number. I like to do things like die 'error' if $problem; Is there a way to do that without printing line number stuff? It would be ...
Credible asked 21/2, 2011 at 18:12

2

Solved

I'm writing a Perl script which uses an external script. The external script must run from a specific directory so I found the following useful: use IPC::System::Simple qw(capture); my @args = ('...
Jethro asked 7/12, 2010 at 14:52

3

Solved

I want to redirect the die messages to a separate file so that I can compare that file later to determine what went wrong. But this code gives me errors: $ cat test.pl use strict; use warnings; ...
Sienese asked 15/10, 2010 at 6:55

2

Solved

I would like my script perl to die whenever a warning is generated, including warnings which are generated by used packages. For example, this should die: use strict; use warnings; use Statistics...
Dipteran asked 9/10, 2010 at 15:4

3

Solved

I am developing some project. And I want to control different errors. I know that in all popular frameworks and php projects there are different Exceptions. But I think that is not required work. I...
Judge asked 2/10, 2010 at 11:40

1

Solved

I am writing a perl script, and in the part where I am checking the options that the user supplied on the command line, I want to exit with an error explaining what was wrong with the options. In t...
Whopper asked 29/8, 2010 at 5:35

5

Solved

I'm playing around with error handling and got a little problem. I connect with a database using the DBI module. I do my own error handling by using a subroutine that I call upon an error. I can ...
Jest asked 13/4, 2010 at 9:41

1

Solved

How can I check what kind of exception caused the script or eval block to terminate? I need to know the type of error, and where the exception occurred.
Paternalism asked 1/3, 2010 at 9:57

3

Solved

Yes, the problem is with a library I'm using, and no, I cannot modify it. I need a workaround. Basically, I'm dealing with a badly written Perl library, that exits with 'die' when a certain error ...
His asked 16/1, 2009 at 17:11

4

In some projects I've done in C, I've liked using the following macros which work similar to Perl's warn and die subroutines: #include <stdio.h> #include <stdlib.h> #define warn(...) ...
Garrulous asked 19/10, 2009 at 2:26

2

Solved

This is a followup to "How can I get around a ‘die’ call in a Perl library I can’t modify?". I have a subroutine that calls a Library-Which-Crashes-Sometimes many times. Rather than couch each cal...
Equitable asked 25/3, 2009 at 21:57

2

Solved

I have been trying to use the Perl utility/module "prove" as a test harness for some unit tests. The unit tests are a little more "system" than "unit" as I need to for...
Dolphin asked 8/10, 2008 at 16:7

© 2022 - 2024 — McMap. All rights reserved.