Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8348035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:34:03+00:00 2026-06-09T07:34:03+00:00

Not sure what I am doing wrong here. I have a tiny program setup

  • 0

Not sure what I am doing wrong here. I have a tiny program setup to parse requests on my localhost. My client has this:

var local_num = null; // init to null
// my server is running on localhost at the moment
// using XMLHttpRequest I send it the value (it woud still be null)
request.open('GET', 'http://127.0.0.1:8080?player=${local_num}', false);

My server code should be able to handle this:

action = params['action'];
var player_num = params['player'];
print ("got player num ${player_num}");
print(player_num is num); // false in both cases (see log below)
print(player_num is int);

if (player_num == null) { // never reaches inside of this if clause
print("received num is null, skipping parsing");
} else {
  try {
    var actual_number = Math.parseInt(received_num);
    print("parsed"); // never gets here
  } catch(var e) {
print(e); // should throw...
  }
}

Server logs this:

// it gets the request, player is null...
Instance of '_HttpRequest@14117cc4'
{player: null}
got player num null
false
false

But then BOOM! -> in dart:bootstrap_impl… around line 1255

int pow(int exponent) {
  throw "Bigint.pow not implemented";
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:34:05+00:00Added an answer on June 9, 2026 at 7:34 am

    The main issue I see at the moment is:

    if (player_num == null) {
    

    In this case, you are checking to see if player_num is a null value. However you don’t check to see if the value is a string ‘null’ which it appears to be in this case.

    From this point it should throw a FormatException when you pass it to parseInt (note: Should not be using the Math. static class, as it is a top-level function within dart:math. The static class Math. is still from dart:core).

    That being said, my try/catch with a parseInt(‘null’); does indeed catch the error. What I’m confused by, is that your error is indicating that the error that’s being displayed, is for the ‘pow()’ function and not related to parseInt() at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure what I'm doing wrong here, I have a file in lib/acts_as_votable.rb
Im not quite sure what I am doing wrong here, I have folloed the
I have a feeling I'm doing something wrong here, but I'm not quite sure
I'm not sure what I am doing wrong here. I have some basic markup.
I'm not sure what I'm doing wrong here, but I have a synatx error
I am not sure what i am doing wrong here. I have a class
Not sure what I'm doing wrong here, but say I have: foo.h class foo
I'm not sure what I'm doing wrong here. I have a generic class, which
Not sure what I'm doing wrong here. I have a struct that is used
I'm not sure what I'm doing wrong here... I have a custom HashTable that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.