久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='Csohe'></bdo><ul id='Csohe'></ul>

        <small id='Csohe'></small><noframes id='Csohe'>

        <i id='Csohe'><tr id='Csohe'><dt id='Csohe'><q id='Csohe'><span id='Csohe'><b id='Csohe'><form id='Csohe'><ins id='Csohe'></ins><ul id='Csohe'></ul><sub id='Csohe'></sub></form><legend id='Csohe'></legend><bdo id='Csohe'><pre id='Csohe'><center id='Csohe'></center></pre></bdo></b><th id='Csohe'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Csohe'><tfoot id='Csohe'></tfoot><dl id='Csohe'><fieldset id='Csohe'></fieldset></dl></div>
      1. <tfoot id='Csohe'></tfoot><legend id='Csohe'><style id='Csohe'><dir id='Csohe'><q id='Csohe'></q></dir></style></legend>
      2. 在 gulp 任務(wù)中很好地拋出錯誤

        Nicely throwing an error in gulp task(在 gulp 任務(wù)中很好地拋出錯誤)

            <small id='Sqyxc'></small><noframes id='Sqyxc'>

            • <tfoot id='Sqyxc'></tfoot>
                <tbody id='Sqyxc'></tbody>
              <i id='Sqyxc'><tr id='Sqyxc'><dt id='Sqyxc'><q id='Sqyxc'><span id='Sqyxc'><b id='Sqyxc'><form id='Sqyxc'><ins id='Sqyxc'></ins><ul id='Sqyxc'></ul><sub id='Sqyxc'></sub></form><legend id='Sqyxc'></legend><bdo id='Sqyxc'><pre id='Sqyxc'><center id='Sqyxc'></center></pre></bdo></b><th id='Sqyxc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Sqyxc'><tfoot id='Sqyxc'></tfoot><dl id='Sqyxc'><fieldset id='Sqyxc'></fieldset></dl></div>
                <bdo id='Sqyxc'></bdo><ul id='Sqyxc'></ul>

                  <legend id='Sqyxc'><style id='Sqyxc'><dir id='Sqyxc'><q id='Sqyxc'></q></dir></style></legend>
                1. 本文介紹了在 gulp 任務(wù)中很好地拋出錯誤的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我正在創(chuàng)建一個在某些情況下可能會失敗的 gulp 任務(wù).

                  gulp.task('favicon', function () {嘗試 {require('child_process').execSync('icotool --version');} 捕捉( e ) {var err = new Error('生成 favicon 需要 Unix bash 和 icotool');拋出錯誤;}返回 gulp.src('', {read: false}).管道(外殼(['./generate-favicon.sh']));});

                  當(dāng)通過 gulp 運(yùn)行我的任務(wù)并遇到錯誤時,該錯誤將呈現(xiàn)得相當(dāng)難看.我想以一種方式呈現(xiàn)錯誤,例如,jslint gulp-util 的 PluginError.

                  它實際上只是在其中創(chuàng)建一個 PluginError 并拋出它,但這似乎不太正確.另一個不太好的解決方案是設(shè)置

                  err.showStack = false;

                  至少有更好的錯誤輸出.gulp.task.Error 會很好.

                  解決方案

                  據(jù)我所知,從 gulp 中拋出錯誤并不是很好.但是我發(fā)現(xiàn)了這個我曾經(jīng)為我工作的博客條目.

                  http://gotofritz.net/博客/geekery/how-to-generate-error-in-gulp-task/

                  編輯:gulp-util已棄用.相反,請使用 plugin-error 包.p>

                  我的例子:

                  var gulp = require('gulp');var error = require('plugin-error');gulp.task('部署',函數(shù)(cb){if(typeof(specialId) === '未定義') {var err = new PluginError({插件:'部署',消息:'specialId 為空.'});}}

                  I am creating a gulp task which might fail under certain circumstances.

                  gulp.task('favicon', function () {
                    try {
                      require('child_process').execSync('icotool --version');
                    } catch( e ) {
                      var err = new Error( 'Unix bash and icotool required for generating favicon' );
                      throw err;
                    }
                  
                    return gulp.src('', {read: false})
                      .pipe(shell([
                        './generate-favicon.sh'
                      ]));
                  });
                  

                  When running my task via gulp and running into the error, the error will be presented rather ugly. I would like to present the error in a way as it is done by e.g. jslint gulp-util's PluginError.

                  It actually works to just create a PluginError there and throw it but that doesn't seem quite right. Another solution not that nice would be to set

                  err.showStack = false;
                  

                  for at least a little nicer error output. A gulp.task.Error would be nice.

                  解決方案

                  From what I've seen its not great to throw an error from gulp. But I found this blog entry that I used to work for me.

                  http://gotofritz.net/blog/geekery/how-to-generate-error-in-gulp-task/

                  Edit: gulp-util has been deprecated. Instead, use the plugin-error package.

                  My Example:

                  var gulp = require('gulp');
                  var error = require('plugin-error');
                  gulp.task('deploy', function(cb) {
                    if(typeof(specialId) === 'undefined') {
                      var err = new PluginError({
                        plugin: 'deploy',
                        message: 'specialId is empty.'
                      });
                    }
                  }
                  

                  這篇關(guān)于在 gulp 任務(wù)中很好地拋出錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運(yùn)算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標(biāo)志傳遞給 Gulp 以使其以不同的方式運(yùn)行任務(wù)?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運(yùn)行 Gulp 任務(wù))
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)

                    • <bdo id='dF34H'></bdo><ul id='dF34H'></ul>
                      <legend id='dF34H'><style id='dF34H'><dir id='dF34H'><q id='dF34H'></q></dir></style></legend>

                            <tbody id='dF34H'></tbody>

                          <small id='dF34H'></small><noframes id='dF34H'>

                          <i id='dF34H'><tr id='dF34H'><dt id='dF34H'><q id='dF34H'><span id='dF34H'><b id='dF34H'><form id='dF34H'><ins id='dF34H'></ins><ul id='dF34H'></ul><sub id='dF34H'></sub></form><legend id='dF34H'></legend><bdo id='dF34H'><pre id='dF34H'><center id='dF34H'></center></pre></bdo></b><th id='dF34H'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='dF34H'><tfoot id='dF34H'></tfoot><dl id='dF34H'><fieldset id='dF34H'></fieldset></dl></div>

                            <tfoot id='dF34H'></tfoot>

                          • 主站蜘蛛池模板: 97久久精品午夜一区二区 | 一区二区三区四区在线视频 | 99免费精品视频 | 狠狠综合久久av一区二区老牛 | 日韩精品一区二区三区免费视频 | 欧美二区在线 | 狠狠涩| 日韩视频精品在线 | 亚洲精品日韩一区二区电影 | h视频免费观看 | 国产激情视频 | 夜夜操天天干 | 在线成人免费视频 | 国产精品揄拍一区二区久久国内亚洲精 | 99久久久久国产精品免费 | 欧美激情黄色 | 二区不卡 | 成人影院一区二区三区 | 日韩精品一区二区三区免费观看 | 五月婷婷丁香婷婷 | 黄网站涩免费蜜桃网站 | 亚洲精品久久久久久久久久久 | 日韩久久久久久久久久久 | 欧美精品成人一区二区三区四区 | 中文字幕免费中文 | 中文字幕一区二区三区在线观看 | 91精品久久久久久久久 | 亚洲精品久久视频 | 亚洲精品一区在线观看 | 精品在线一区二区 | 亚洲午夜精品一区二区三区他趣 | 综合五月 | 美日韩一区二区 | 日韩欧美一级精品久久 | 欧美三级网站 | 亚州精品天堂中文字幕 | 日本高清不卡视频 | 亚洲精品一区二区三区在线 | 日日艹夜夜艹 | 亚洲国产精品精华素 | 亚洲欧美成人 |