| |

VerySource

 Forgot password?
 Register
Search
View: 490|Reply: 4

Why not prompt after catching an error

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-29 09:00:01
| Show all posts |Read mode
catch (Exception ex)
                {
                    Response.Write ("<script defer> window.alert ('Import failed!" + Ex + "'); </ script>");
                    return;
                }
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-3-1 18:45:01
| Show all posts
What is defer?

+ ex.Message
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-1 21:00:01
| Show all posts
catch (Exception ex)
                {
                    Response.Write ("<script> window.alert ('Import failed!" + Ex.Message + "'); </ script>");
                }
Reply

Use magic Report

0

Threads

58

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-3-1 22:45:01
| Show all posts
string err = string.Format ("<script> alert ('{0}'); </ script>", ex.Message) // ex.Message may need to process '' characters.

response.Write (err);
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-3-3 00:15:01
| Show all posts
Thank you
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list