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

  • Thread starter Thread starter Benson
  • Start date Start date
B

Benson

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
 
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
 
Benson said:
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
 
Back
Top