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 luci = (function(luci) { |
| 11 |
| 12 var rpc = luci.rpc = luci.rpc || {}; |
| 13 |
| 14 function GrpcError(code, description) { |
| 15 if (code == null) { |
| 16 throw Error('code is not set') |
| 17 } |
| 18 this.name = 'GrpcError'; |
| 19 this.code = code; |
| 20 this.description = description; |
| 21 this.message = 'code = ' + code + ' desc = ' + description; |
| 22 } |
| 23 GrpcError.prototype = Error(); |
| 24 rpc.GrpcError = GrpcError; |
| 25 |
| 26 return luci; |
| 27 }(luci || {})); |
| 28 </script> |
OLD | NEW |