
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
vue-exception-captor
Advanced tools
本项目以Vue插件方式应用与Vue工程中,用于捕获Vue前端工程中出现的全局异常、Vue组件异常、Promise异常,并支持HTTP接口方式上送到后台服务进行分析统计。异常捕获主要来自以下几个钩子函数:
捕获Vue组件异常
1. Vue组件内的同步异常,无法被window.onerror捕获
2. Vue组件内部的定时器异常,可以被window.onerror捕获
3. window.onerror不能捕获promise异常
捕获Promise异常
npm install vue-exception-captor
import vue-exception-captor from "vue-exception-captor"
Vue.use(vue-exception-captor,{
productName: 'psdc',
username:'testuser',
reportUrl: '/event-tracking/exceptions',
disabled: process.env.NODE_ENV !== 'production',
console: true,
})
安装完插件后,会向vue注册两个属性
Vue.prototype.$exceptionCaptor
在Vue实例中使用该方法设置username,使得上报的异常可以标识来自哪个用户(只需要在用户名变化后调用一次,后续所有上报的异常均使用该用户名)
this.$exceptionCaptor.setUserName(userName)
Vue.prototype.$reportException
在Vue实例中使用以下方法上报异常
this.$reportException(type,error,message,level)
FAQs
用于捕获Vue前端工程中的全局异常、Promise异常,并支持HTTP模式上报到后台存储
The npm package vue-exception-captor receives a total of 2 weekly downloads. As such, vue-exception-captor popularity was classified as not popular.
We found that vue-exception-captor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.