Click here to Skip to main content
14,271,952 members

Web Development

 
Questionjquery chatbot code example for static answers Pin
byka17-Jun-19 8:40
memberbyka17-Jun-19 8:40 
AnswerRe: jquery chatbot code example for static answers Pin
Mycroft Holmes17-Jun-19 12:15
memberMycroft Holmes17-Jun-19 12:15 
Questiondoes anyone here use ELMAH? Pin
#realJSOP14-Jun-19 9:08
mve#realJSOP14-Jun-19 9:08 
QuestionDraw 3*3 Rubik’s cube Pin
Member 1449931913-Jun-19 6:53
memberMember 1449931913-Jun-19 6:53 
AnswerRe: Draw 3*3 Rubik’s cube Pin
#realJSOP13-Jun-19 7:48
mve#realJSOP13-Jun-19 7:48 
AnswerRe: Draw 3*3 Rubik’s cube Pin
ZurdoDev17-Jun-19 11:33
professionalZurdoDev17-Jun-19 11:33 
QuestionProblems Calling Asp.Net WebAPI 2 Pin
Kevin Marois11-Jun-19 12:07
professionalKevin Marois11-Jun-19 12:07 
AnswerRe: Problems Calling Asp.Net WebAPI 2 Pin
Richard Deeming12-Jun-19 0:45
mveRichard Deeming12-Jun-19 0:45 
Kevin Marois wrote:
if (isPrimitive || type == typeof(string) || type == typeof(decimal))

That line looks suspicious for the Guid problem - a Guid is not a primitive type, so you're always passing it in the body instead of the querystring.

A couple of other comments:
Kevin Marois wrote:
catch (Exception e)
{
    throw e;
}

Don't do that. You've just destroyed the stack trace of the exception. If you have to re-throw an exception, just use throw; instead of throw e;. But in this case, since you're not doing anything with the exception, there's no point in catching it.

Kevin Marois wrote:
throw new Exception(message);

You should avoid throwing the base Exception type; use a more specific exception type instead.

If you throw the base Exception type, your calling code has no choice but to use a "Pokemon" catch block (gotta catch 'em all). It has no way of knowing whether it can handle the exception or not.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Problems Calling Asp.Net WebAPI 2 Pin
Kevin Marois12-Jun-19 4:02
professionalKevin Marois12-Jun-19 4:02 
GeneralRe: Problems Calling Asp.Net WebAPI 2 Pin
Richard Deeming12-Jun-19 4:25
mveRichard Deeming12-Jun-19 4:25 
GeneralRe: Problems Calling Asp.Net WebAPI 2 Pin
Kevin Marois12-Jun-19 5:26
professionalKevin Marois12-Jun-19 5:26 
GeneralRe: Problems Calling Asp.Net WebAPI 2 Pin
Kevin Marois12-Jun-19 6:34
professionalKevin Marois12-Jun-19 6:34 
GeneralRe: Problems Calling Asp.Net WebAPI 2 Pin
Richard Deeming12-Jun-19 8:10
mveRichard Deeming12-Jun-19 8:10 
QuestionEliminating External (Commercial) References/Creating my own design/Stylesheets Pin
Member 120802018-Jun-19 6:23
memberMember 120802018-Jun-19 6:23 
AnswerRe: Eliminating External (Commercial) References/Creating my own design/Stylesheets Pin
Afzaal Ahmad Zeeshan8-Jun-19 10:18
mveAfzaal Ahmad Zeeshan8-Jun-19 10:18 
AnswerRe: Eliminating External (Commercial) References/Creating my own design/Stylesheets Pin
jamieereynoldss9-Jun-19 23:51
memberjamieereynoldss9-Jun-19 23:51 
AnswerRe: Eliminating External (Commercial) References/Creating my own design/Stylesheets Pin
#realJSOP10-Jun-19 5:08
mve#realJSOP10-Jun-19 5:08 
QuestionHow to learn python numpy library easily, which functions are important Pin
Member 144829305-Jun-19 22:54
memberMember 144829305-Jun-19 22:54 
AnswerRe: How to learn python numpy library easily, which functions are important Pin
Vinod Jangle6-Jun-19 3:56
memberVinod Jangle6-Jun-19 3:56 
SuggestionRe: How to learn python numpy library easily, which functions are important Pin
Richard Deeming6-Jun-19 4:38
mveRichard Deeming6-Jun-19 4:38 
GeneralRe: How to learn python numpy library easily, which functions are important Pin
Vinod Jangle6-Jun-19 6:05
memberVinod Jangle6-Jun-19 6:05 
GeneralMessage Closed Pin
9-Jun-19 23:49
memberjamieereynoldss9-Jun-19 23:49 
AnswerMessage Closed Pin
15-Jun-19 3:55
memberRahul Khot15-Jun-19 3:55 
QuestionPass Guid To Controller Pin
Kevin Marois4-Jun-19 8:37
professionalKevin Marois4-Jun-19 8:37 
AnswerRe: Pass Guid To Controller Pin
Richard Deeming5-Jun-19 12:26
mveRichard Deeming5-Jun-19 12:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.