OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 Use of this source code is governed by a BSD-style license that can be |
| 4 found in the LICENSE file. |
| 5 --> |
| 6 |
| 7 <script> |
| 8 'use strict'; |
| 9 |
| 10 var rpcExplorer = (function(rpcExplorer) { |
| 11 |
| 12 function GrpcError(code, description) { |
| 13 if (code == null) { |
| 14 throw Error('code is not set') |
| 15 } |
| 16 this.name = 'GrpcError'; |
| 17 this.code = code; |
| 18 this.description = description; |
| 19 this.message = 'code = ' + code + ' desc = ' + description; |
| 20 } |
| 21 GrpcError.prototype = new Error(); |
| 22 rpcExplorer.GrpcError = GrpcError; |
| 23 |
| 24 return rpcExplorer; |
| 25 }(rpcExplorer || {})); |
| 26 </script> |
OLD | NEW |