[Feature Request]: print `qenv.error` automatically

未关闭
#204 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
r
领域
tooling

调研方向

首先追踪 qenv.error 对象是如何创建的,以及在返回其中一个对象时,诸如 join_keys<- 之类的调用是如何进行分派的。确定可以在哪里集中处理自动打印,以及如何在不为每个操作添加一个方法的情况下保持可扩展性;当已为报告的错误情况和相关方法调用定义行为时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

core enhancement
Feature description

I'm observing more and more use cases where people don't know how to behave when seeing this:

Error in UseMethod("join_keys<-", x) : 
  no applicable method for 'join_keys<-' applied to an object of class "c('qenv.error', 'try-error', 'simpleError', 'error', 'condition')"

(or any other method applied on qenv.error class of object)

Usually the only thing they need to do is to print a given object which should have enough information about the error itself. Now I'm thinking if we can do such print automatically and don't ask users to explicitly print it. We can do print right when the error occurs or print on (any) method calls or something else. Please just make sure to make it easily extendable with regard to methods - anti-pattern would be a new methods: join_keys.qenv.error, join_keys<-.qenv.error and so on... That's not very scalable.

Code of Conduct
  • I agree to follow this project's Code of Conduct.
Contribution Guidelines
  • I agree to follow this project's Contribution Guidelines.
Security Policy
  • I agree to follow this project's Security Policy.
主要语言
R
星标
12
派生
12
平均合并
4 天 22 小时
30 天内合并 PR
3

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pharmaverse/teal.code 的其他 Issue

查看 pharmaverse/teal.code 的全部 Issue

相似的 Issue

更多 R Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。