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

  • Home
  • SEARCH
  • 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 9120997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:45:31+00:00 2026-06-17T05:45:31+00:00

I am developing an application for Windows 8 Metro using Javascript (WinJS). Let’s say

  • 0

I am developing an application for Windows 8 Metro using Javascript (WinJS).

Let’s say I have the following code:

Windows.Storage.ApplicationData.current.localFolder.createFileAsync("test.dat", Windows.Storage.CreationCollisionOption.replaceExisting)
    .done(
        /* write some data to the file here */)

var x = null;
x.prop = 1;

It is obvious that the previous code will crash on the line x.prop = 1. What happens to the createFileAsync Promise?

Doing a simple debug test yields the fact that the Promise will be finished even though the app crashes, but can I be certain that that will always be the case, and that the file will be created and written?

Thanks.

  • 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-17T05:45:32+00:00Added an answer on June 17, 2026 at 5:45 am

    I don’t think you can be certain that the Promise will complete if the app crashes. If the operation that returns the Promise completes quickly enough, it might. But if you’re looking for a guarantee, I don’t think you’ll get that.

    I would recommend coding defensively, so that if the file is not created, you can create it the next time your app runs.

    Of course, most importantly, you should be doing proper exception handling to ensure that the app does not crash because of a simple exception.

    For more info on developing Windows Store apps, check out Generation App.

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

Sidebar

Related Questions

I am developing the metro style windows 8 app using html,javascript and css. I
I am developing an application for Windows 8 (Metro UI). I am using HTML5,
I'm developing a Metro-style app (for Windows 8) using C# and XAML. I have
Hai I am Developing an Windows application using C#.Net where I have to block
I am developing a client/server Javascript Windows 8 Metro application and I used Microsoft's
I'm developing a Windows application in VS2005 using C#. In my project, I generate
I am developing a windows application in C#. I have been searching for the
I'm developing an winform application for Windows Mobile 5.0 and above. I'm using .Net
i'm developing an application (wpf) that have 3 windows. in the main window user
We are developing a Windows application using C#. We would like to change the

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.