blob: f8afa055b7dde3ad0b5e632c39385eb71cc202c2 [file] [log] [blame]
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library http2.src.sync_errors;
class ProtocolException implements Exception {
final String _message;
ProtocolException(this._message);
String toString() => 'ProtocolError: $_message';
}
class FlowControlException implements Exception {
final String _message;
FlowControlException(this._message);
String toString() => 'FlowControlException: $_message';
}
class FrameSizeException implements Exception {
final String _message;
FrameSizeException(this._message);
String toString() => 'FrameSizeException: $_message';
}
class TerminatedException implements Exception {
String toString() => 'TerminatedException: The object has been terminated.';
}
class StreamException implements Exception {
final String _message;
final int streamId;
StreamException(this.streamId, this._message);
String toString() => 'StreamException(stream id: $streamId): $_message';
}
class StreamClosedException extends StreamException {
StreamClosedException(int streamId, [String message = ''])
: super(streamId, message);
String toString() => 'StreamClosedException(stream id: $streamId): $_message';
}