473,507 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to do "die in php" under VB.net and ASP.net

In php coding:
....
if(something wrong)
die("stop here");
....
....

How to code the "die" in VB.net and ASP.net? (I dislike using
status_variable and exit sub.)

Benson
VS2005
Mar 23 '07 #1
2 3672
"Benson" <be*******@yahoo.com.hkwrote in news:#s#3mkObHHA.4656
@TK2MSFTNGP06.phx.gbl:
In php coding:
...
if(something wrong)
die("stop here");
...
...

How to code the "die" in VB.net and ASP.net? (I dislike using
status_variable and exit sub.)

Try
My Code Here
Catch ex as exception
Handle exception here
End Try
Mar 23 '07 #2
Benson wrote:
In php coding:
...
if(something wrong)
die("stop here");
...
...

How to code the "die" in VB.net and ASP.net? (I dislike using
status_variable and exit sub.)

Benson
VS2005
I don't know exactly what die does in PHP, but I suppose it's the
equivalent of throwing an exception in .NET.

If something is Nothing Then
Throw New ArgumentNullException("Argument 'something' may not be null.")
End If

--
Göran Andersson
_____
http://www.guffa.com
Mar 23 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2157
by: Mike Bobbitt | last post by:
I've recently decided to switch from compiled Apache/PHP to RPM's of both and I'm having a problem I can't seem to solve. I have a Perl script called php_include.cgi that parses a PHP file for...
3
5492
by: Vik Rubenfeld | last post by:
I'm a newbie to Apache. This week I installed my first Apache 2.0 server, and it's working fine. I then installed PHP. When I ran the PHP test file ("test.php"), the actual text contents of the...
6
2508
by: Terence | last post by:
These comparrison articles are always fun :) http://otn.oracle.com/pub/articles/hull_asp.html
1
3124
by: Danny Anderson | last post by:
Hola, PHP folk! I have a php page that contains a self-processing form. The form holds search results. The search terms originally came from the previous page, but the user can repeatedly...
48
4706
by: mahurshi | last post by:
I am new to c++ classes. I defined this "cDie" class that would return a value between 1 and 6 (inclusive) It runs fine and gives no warnings during compilation. I was wondering if you guys...
5
3198
by: Jim Carlock | last post by:
I've set up the following using an Alias in Apache... Alias /phpdocs/ "C:/Apache/htdocs/common/docs/php/" <Directory "C:/Apache/htdocs/common/docs/php"> Options Indexes FollowSymlinks MultiViews...
0
1628
by: jhsedona | last post by:
I try to upgrade site from non-ssl to ssl site, but there are too mcuh thing to do. I decide to use url forwarding to https://www.domain.com for my whole site. When i go to 1st page of site, ...
5
7347
by: Pseudonyme | last post by:
Dear All : Ever had an httpd error_log bigger than the httpd access log ? We are using Linux-Apache-Fedora-Httpd 2006 configuration. The PHP lines code that lead too tons of errors are : ...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7034
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
1544
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.