title: Can't catch exceptions from async/await?
body: <p>I'm trying to catch a <code>PlatformException</code> raised by <code>FlutterBlue.instance</code>. I've put a try except block around this await, but the exception still gets raised in my debugger.  What am I doing wrong?</p>
  
  <pre><code>import 'package:flutter/services.dart';
  import 'package:flutter_blue/flutter_blue.dart';
  
  ...
  
  Stream&lt;BluetoothState&gt; _getBluetoothState() async* {
    bool isAvailable = false;
    try {
      // This always raises a PlatformException
      // in the vscode debugger
      isAvailable = await FlutterBlue.instance.isAvailable;
    } on PlatformException catch(e) {
      // This doesn't seem to ever catch anything
      debugPrint('$e');
    } catch(e) {
      // Doesn't catch my exception either.
      debugPrint('$e');
    }
  
    // Wrap the original stream that fails to handle this exception..
    if (isAvailable) {
      await for (BluetoothState state in FlutterBlue.instance.state) {
        yield state;
      }
    } else {
      yield BluetoothState.unavailable;
    }
  }
  </code></pre>
  
  <p>UPDATE: Actually, I'm not even sure this relates to async/wait, I believe <code>FlutterBlue.instance</code> is raising the error and that isn't async. It's just a getter.  I'm a dart newbie, and this has me pretty lost.</p>